Closed
Description
Hi :)
Why use python 2 syntax in examples today? Since Python 2 has been discontinued in January 1, 2020.
Examples:
-
In many examples
print "string"
syntax is used. -
In "Create a length-N list of lists" is used:
four_lists = [[] for __ in xrange(4)]
instead:
four_lists = [[] for __ in range(4)]
Has a note stating the new syntax:
Note: Use range() instead of xrange() in Python 3.
But is this really necessary today? Isn't it better to update everything to Python 3 syntax?
Metadata
Metadata
Assignees
Labels
No labels