13 lines
337 B
Python
13 lines
337 B
Python
|
|
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")
|