1items=['baseball','basketball','football']
2for index, item in enumerate(items):
3 print(index, item)
1colors = ["red", "green", "blue", "purple"]
2
3for i in range(len(colors)):
4 print(colors[i])
5
1colors = ["red", "green", "blue", "purple"]
2i = 0
3while i < len(colors):
4 print(colors[i])
5 i += 1
6
1# Creates two variables; An index (num), and the value at that index (line)
2for num, line in enumerate(lines):
3 print("{0:03d}: {}".format(num, line))
4
1colors = ["red", "green", "blue", "purple"]
2for i in range(len(colors)):
3 print(colors[i])
4