x = [] # prazen seznam i = 1 while True : # brali bomo, dokler ne preberemo neg. podatka pod = input("Vnesi " + str(i) + ". podatek: ") st = int(pod) if st < 0: # konec podatkov break x = x + [st] i = i + 1 i = len(x) - 1 rezultat = "" while i >= 0 : rezultat = rezultat + "\n" + str(x[i]) i = i - 1 print("Obratno:\n" + rezultat)