A pointer is an object which represents an address in memory.
A reference is just a 'nickname' or 'alias' for an existing object.
I'm not going to go into any further detail since the nature of the question sounds a little bit like 'please do my homework for me'. Have you tried a google search? you ought to be able to come up with some fairly detailed search results about Pointers-vs-references
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: