im trying to print all the result of the comparison of each input integers in one line. But it looks like that my list becomes empty as the loop goes. any idea how to do it? here is my code so far. Thanks
f_n = 0 n_n = 0 print('Enter the first number: ' , end = ' ') fn = input() f_n = int(fn) finished = False while not finished: print('Enter the next number, 0 to finish: ' , end = ' ') nu = input() n_n = int(nu) if n_n != 0: demands = [] if n_n == f_n: demands.append ('Same.') elif n_n > f_n: demands.append('Up.') elif n_n < f_n: demands.append('Down.') f_n = n_n else: finished = True print (demands)