[ create a new paste ] login | about

Link: http://codepad.org/QS59haVS    [ raw code | output | fork ]

slevy1ster - Python, pasted on Nov 29:
1
2
3
4
5
6
7
#python - negative array indexing

a = (0,1,2,3,4,5,6,7)
print a[-1]

b = "sharon"
print b[-3]


Output:
1
2
7
r


Create a new paste based on this one


Comments: