Mega Code Archive
Categories
/
Python
/
List
List Slicing Shorthand
li = ['a', 'b', 'mpilgrim', 'z', 'example'] print li[:3] print li[3:] print li[:]