diff options
Diffstat (limited to 'python3.html.markdown')
-rw-r--r-- | python3.html.markdown | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/python3.html.markdown b/python3.html.markdown index 019934cb..d6cfbf59 100644 --- a/python3.html.markdown +++ b/python3.html.markdown @@ -138,6 +138,10 @@ len("This is a string") # => 16 # still use the old style of formatting: "%s can be %s the %s way" % ("Strings", "interpolated", "old") # => "Strings can be interpolated the old way" +# You can also format using f-strings or formatted string literals +name = "Reiko" +f"She said her name is {name}." # => "She said her name is Reiko" + # None is an object None # => None |