Python integer infinity for slicing Python integer infinity for slicing python python

Python integer infinity for slicing


There is no "infinity integer constant" in Python, but using None in a slice will cause it to use the default for the given position, which are the beginning, the end, and each item in sequence, for each of the three parts of a slice.

>>> 'abc'[:None]'abc'


Have you tried with sys.maxint?