Getting an invalid syntax when trying to perform string interpolation
As suggested by Josh Lee in the comment section, that kind of string interpolation was added in Python 3.6 only, see What’s New In Python 3.6 (here it's called "PEP 498: Formatted string literals").
You, however, seems to be using Python 3.5.2, which does not support that syntax.
f-strings giving SyntaxError?
I think you have an old version of python. try upgrading to the latest version of python. F-string literals have been added to python since python 3.6. you can check more about it here
Why do I get an error with print(f ({x}, {y}) )?
you are trying to format the string while printing so you can use
for x in range(5):
for y in range(3):
print('{}, {}'.format(x, y))
Getting an invalid syntax when trying to perform string interpolation
As suggested by Josh Lee in the comment section, that kind of string interpolation was added in Python 3.6 only, see What’s New In Python 3.6 (here it's called "PEP 498: Formatted string literals").
You, however, seems to be using Python 3.5.2, which does not support that syntax.
Related Topics
Creating a Symbolic in Shared Volume of Docker and Accessing It in Host MAChine
Make (Install from Source) Python Without Running Tests
List Comprehension Rebinds Names Even After Scope of Comprehension. Is This Right
What Are the Risks of Running 'Sudo Pip'
Your CPU Supports Instructions That This Tensorflow Binary Was Not Compiled to Use: Avx Avx2
What Does the _File_ Variable Mean/Do
How to Make a Timezone Aware Datetime Object
Filtering Pandas Dataframes on Dates
Order of Keys in Dictionaries in Old Versions of Python
Is It Worth Using Python's Re.Compile
Why Does Loading the Libc Shared Library Have "'Libraryloader' Object Is Not Callable" Error
How to Print a Variable Name in Python
Apply Function to Each Element of a List
Understanding _Get_ and _Set_ and Python Descriptors
What Should I Do with "Unexpected Indent" in Python