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.
More Related Contents:
- What are type hints in Python 3.5?
- How to correct TypeError: Unicode-objects must be encoded before hashing?
- What is the ‘@=’ symbol for in Python?
- Python cannot handle numbers string starting with 0. Why?
- How can I periodically execute a function with asyncio?
- How to use asyncio with existing blocking library?
- ImportError: No module named ‘django.core.urlresolvers’
- Python print statement “Syntax Error: invalid syntax” [duplicate]
- Self-reference or forward-reference of type annotations in Python [duplicate]
- Does asyncio supports asynchronous I/O for file operations?
- Why do parentheses in a lambda function cause syntax error on Python 3? [duplicate]
- asyncio.ensure_future vs. BaseEventLoop.create_task vs. simple coroutine?
- How to set Python3.5.2 as default Python version on CentOS?
- Invalid Syntax error when running python from inside Visual Studio Code
- How to search and replace text in a file?
- How to access variables from different classes in tkinter?
- Converting int to bytes in Python 3
- multiprocessing: Understanding logic behind `chunksize`
- Python Script returns unintended “None” after execution of a function [duplicate]
- How to run pip of different version of python using python command?
- Let JSON object accept bytes or let urlopen output strings
- How to print a list with integers without the brackets, commas and no quotes? [duplicate]
- python tkinter return value from function used in command
- Safely evaluate simple string equation
- Is there anything faster than dict()?
- Python 3 integer division [duplicate]
- How to avoid “Permission denied” when using pip with virtualenv
- Pandas ParserError EOF character when reading multiple csv files to HDF5
- What is internal representation of string in Python 3.x
- Run process with realtime output to a Tkinter GUI