They are both better in their own ways, however if you school is going based off of Python 3, then I can assure you that you will be marked wrong if you provide P2 syntax. Little things like print vs print() or range vs xrange
|
Python
School is teaching Python 3 but I am learning Python 2 |
|
Its translates easily, I found a good way to get a quick look at the differences is reading the 2to3 documentation.
2to3 is a good util for doing quick conversions but its not perfect so don't depend on it, sometimes outputting the diff and doing the work yourself is best. (Oct 12, 2015 10:13 PM)Enzio Wrote: I've heard that Python 2 is better. This is why I am asking that 😵No. Python 3 is the future. The only differences you'll notice are some slight syntax changes, and a separation between data (bytes) and strings. |
|
|
