Possible Duplicate:
good primer for python slice notation
I have this Python code; items
is a list of tuples:
# Print the first 20
for item in items[:20]:
print item[0], item[1]
It prints the first twenty elements of the list. If the list has fewer than twenty elements, it still works, but I don't understand why. How do I interpret it?