User Tools

Site Tools


en:play:basics:versions
 
 

Python versions

2.x 3.x
Compulsory parenthesis print “Hello World” print (“Hello World”)
Integer division returns an integer can return a float
Unicode use a character u, for example u “Hello” string is Unicode by default
raw_input() function is used to get input from the user (reads a string) doesn't exist
input() function reads as strings if they are inside quotes else reads as numbers reads the input as a string
Next value of generator generator next() next(generator)
Third-party module support Lots. Some frameworks are still using Python 2 Limited
Community support Awesome. Python 2 was released in late 2000 and has been in use for more than 15 years. Growing
Future doesn't exist Python 3 has released stable versions for past 7 years and will continue.
More information Python 2.7.15 documentation Python 3.5 documentation

|

 
 
en/play/basics/versions.txt · Last modified: 2020/07/03 17:41 by Digital Dot