r/PowerShell • • Sep 17 '20

PowerShell vs Python Reference

https://blog.ironmansoftware.com/powershell-vs-python/
206 Upvotes

51 comments sorted by

View all comments

2

u/jftuga Sep 18 '20

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'