List slicing selecting parts of lists

suggest change

Syntax

Remarks

a[-1]    # last item in the array
a[-2:]   # last two items in the array
a[:-2]   # everything except the last two items

(source)

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents