Q:

Store a List of Integers in Python

I need to create a Python list that can store integers. I then need to be able to print out each of those integers using print() and then empty the list afterwards.

A:

the_list=[] # create list
the_list.append(1) # add number
for x in the_list:
    print(x) # print number
the_list=[] # clear list

If you've got many integers, you can do the following:
a=open("file","r") # if they're in a file and written newline-separated
for x in a:
    the_list.append(int(x)) # add a value to list
a.close() # close file
for x in the_list:
    print(x) # print value line by line
the_list=list() # empty list

