13 lines
337 B
Python
Raw Normal View History

2021-04-17 22:41:26 -04:00
mylist = []
mylist.append(1)
mylist.append(2)
mylist.append(3)
print (mylist[0]) #Print entry 0, or the first entry!
print (mylist[1]) #Prints the second entry
print (mylist[2]) #Prints the third entry, You never would have guessed!!
#basic for loop to iterate through your list
for x in mylist:
print(x, "From inside a for loop")