If you want to set a limit when you iterate a list in python slice it up by doing this:
for i in list[0:6]:
print i
This will list the first 5 items.
If you want to set a limit when you iterate a list in python slice it up by doing this:
for i in list[0:6]:
print i
This will list the first 5 items.