Update "variable interpolation"/"here document"/"expression interpolation" Python sections to indicate support for string interpolation in Python 3.6 #67

cjguttormsson opened this Issue Dec 28, 2016 · 0 comments


None yet

1 participant

cjguttormsson commented Dec 28, 2016 edited

Python 3.6 added the ability to interpolate variables into strings using this syntax (following the other examples):

Variable interpolation:

count = 3
item = 'ball'
print(f'{count} {item}s')

Here documents:

word = "amet"

s = f"""lorem ipsum
dolor sit {word}"""

Expression interpolation:

f'1 + 1 = {1 + 1}'

The relevant sections should be updated to indicate these capabilities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment