I downloaded python 3.4 on the site, but some commands do not work in this version compared to python2.7 does it make any difference? In the python2.7 manual, and can I install two?
I downloaded python 3.4 on the site, but some commands do not work in this version compared to python2.7 does it make any difference? In the python2.7 manual, and can I install two?
If you are right at the beginning, the biggest difference you will find in relation to the documentation for Python 2 is the "print" command - it ceases to be a command and becomes a function - So in Python 3, always use print as a function call, with parentheses:
print ("Alô mundo!")
Of course there are many other changes - many only visible to more advanced users. Internally, the biggest change is that strings in Python 3 contain text characters, whereas in Python 2.x they always contained "bytes". The bytes and text characters match for numbers, some symbols, and uncharted letters - but for other characters besides these, you need to specify a coding.
Even so, at the basic learning level, Python will "guess" the text encoding of your operating system and things will work.
Here's a cool video lesson on the biggest differences between versions: link
And here's a post with a lot of stuff: link
One thing that is important to understand is that the two versions are still retained - why many existing projects already in Python 2 were not ported to Python 3. But nowadays, it is certainly better to learn version 3.4
p>