Quick Answer
Python 2 (EOL 2020): print is a statement, integer division by default, str is bytes, unicode is separate type, range() returns a list. Python 3: print() is a function, true division by default, str is unicode, bytes is separate, range() returns a lazy iterator. Python 3 is the only supported version now - all new code should use Python 3.
Answer
Key differences: • print is a function in Python 3 • / returns float in Python 3 • Strings are Unicode by default • Most libraries support Python 3 only
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.