Mega Code Archive

 
Categories / Python / List
 

Negative List Indices

li = ['a', 'b', 'mpilgrim', 'z', 'example']  print li[-1]                                              print li[-3]