Question: I've appended several items to a list called `Result`. But when I print `Result`, it shows `[]` regardless of how many items I have appended. 

```

 while(True):

    ExitOption = "1"
    Result = []

    selection = input("1.Calculator \n2.Calculation History \n3.Exit \n")

    if selection == "1":
        while(ExitOption == "1"):
            print("PYTHON CALCULATOR")
            num1 = int(input("Enter a number:"))
            num2 = int(input("Enter a second number:"))
            operator = input("Choose a operator +, -, /, * :")

            if "+" in operator:
                result = num1 + num2
            else:
                print("You have chosen an invalid operator")

            print(result)
            Result.append(result)
            ExitOption = input("Would you like to continue? \n1.Yes \n2.No \n")

    elif selection == "2":
        print("Calculation History")
        print("\n")

        print(Result)

    elif selection == "3":
        print("Programme End")
        break

    else:
        print("You have chosen an invalid selection.")

```

Answer: 
You're resetting `Result` on every iteration of the outermost loop. That is to say, right before you're asking whether the user wants the calculation history, you clear it out.

Fortunately, it's a quick fix. Move that part outside the loop, and you won't overwrite it anymore.

```
Result = []
while(True):

    ExitOption = "1"
    selection = input("1.Calculator \n2.Calculation History \n3.Exit \n")

    ...

```
Your Result object is defined inside the while loop , and as such , is a variable local to that while loop : Result is reset every time your while loop runs its block.

You may want to move Result outside of the while .