Simple slicing question

Nikhil R. Deshpande dnikhil at ip.eth.net
Mon Jan 14 05:18:34 EST 2002


Python 2.2 (#28, Dec 21 2001, 12:21:22) [MSC 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> a = [1, 2, 3]
>>> a[100:200]
[]

Why doesn't a[100:200] result in an IndexError?

Thanks,
 Nikhil





More information about the Python-list mailing list