What version of Python is better in your opinion and why (Reply with your thoughts)?
- Python 2
- Python 3
0 voters
What version of Python is better in your opinion and why (Reply with your thoughts)?
0 voters
# Python 3
while (choice := input("WHY!?")) != "NO":
choice = input("WHY!?")
# Python 2
choice = input("WHY!?")
while choice != "NO":
choice = input("WHY!?")
I like the walrus operator.
python 3 has a bunch of QoL improvements and most software that’s up to date is either written or has versions written in python 3 so even if the syntax was better in python 2, the amount of utility in python 3 outweighs it. In addition, some language clean ups to make it more reliable, useable, and scalable were added.
I googled differences and found an article about it here too so if you want you can read it Difference Between Python 2 and 3 - InterviewBit (most of it I already knew )
Who would in their sane mind start something in python 2 these days if not truly forced???