|
Size: 757
Comment:
|
Size: 758
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 7: | Line 7: |
| In Python `range` is a function that return a list. | In Python `range` is a function that returns a list. |
Warning: |
Starting from version 9.0, the default distributed version of Sage is using Python 3. See Python3-Switch for more information. |
Main caveat
range and xrange
In Python range is a function that returns a list.
In Python 3, range is an object that somehow behave as a list (ie elements can still be acessed with square bracket, it has a length, etc) but it is not a list.
The iterator xrange is no longer valid in Python 3.
