MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/PowerShell/comments/iuifz8/powershell_vs_python_reference/g5ow7ka/?context=3
r/PowerShell • u/[deleted] • Sep 17 '20
51 comments sorted by
View all comments
2
Why the hell does python require you to enclose numbers in quotes when casting? That syntax is reserved for strings!
2 u/yardshop Sep 18 '20 It doesn't, those examples just show casting strings to different numerical types.You can also cast an int to a float or vice versa, either from literals or other variables:f = float(10) i = int(f) i = int(3.14)
It doesn't, those examples just show casting strings to different numerical types.
You can also cast an int to a float or vice versa, either from literals or other variables:
f = float(10) i = int(f) i = int(3.14)
2
u/Test-NetConnection Sep 17 '20
Why the hell does python require you to enclose numbers in quotes when casting? That syntax is reserved for strings!