Below is code from my class. When I run the code with several integers, it somehow stores them and returns them all when "else" is run. I suspect it is because of the empty "" values for the variables below. Is this correct? Also, I don't completely understand how this works below: num_final = num_temp + num_1; and num_temp=num_final; Is this telling the code-gremlin to store the values in memory until "else" is called?
num_1="" num_temp="" num_final="" while True: num_1 = input ("Enter and integer: ") if num_1.isdigit(): num_final = num_temp + num_1 num_temp=num_final else: print(num_final) break