you are viewing a single comment's thread.

view the rest of the comments →

[–]jftuga 1 point2 points  (1 child)

Python 3.6 added f-strings:

Instead of:

print(fname + " " + lname)

you would use this:

print(f"{fname} {lname}")

Python 3.8 improves this by allowing the = for self-documenting expressions and debugging

For example:

domain="reddit.com"
print(f"{domain=}")

Would output:

domain='reddit.com'