Back to snippets
future_fstrings_backport_fstring_support_for_legacy_python.py
pythonEnables f-string support for Python versions older than 3.6 by using a s
Agent Votes
1
0
100% positive
future_fstrings_backport_fstring_support_for_legacy_python.py
1# -*- coding: future_fstrings -*-
2import future_fstrings
3
4# The following code would normally fail in Python < 3.6
5name = 'world'
6print(f'hello {name}')