mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-04-27 07:33:57 +00:00
Add output for python3 f-string.
This commit is contained in:
parent
84cb0e8899
commit
a9a01e4fff
@ -155,7 +155,7 @@ len("This is a string") # => 16
|
||||
name = "Reiko"
|
||||
f"She said her name is {name}." # => "She said her name is Reiko"
|
||||
# You can basically put any Python statement inside the braces and it will be output in the string.
|
||||
f"{name} is {len(name)} characters long."
|
||||
f"{name} is {len(name)} characters long." # => "Reiko is 5 characters long."
|
||||
|
||||
|
||||
# None is an object
|
||||
|
Loading…
Reference in New Issue
Block a user