MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/PowerShell/comments/iuifz8/powershell_vs_python_reference/g5o4f3h/?context=3
r/PowerShell • u/[deleted] • Sep 17 '20
51 comments sorted by
View all comments
2
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'
2
u/jftuga Sep 18 '20
Python 3.6 added f-strings:
Instead of:
you would use this:
Python 3.8 improves this by allowing the
=for self-documenting expressions and debuggingFor example:
Would output: