Add numbers entered by the user (oups)



examples/basics/add.py
def main():
    a = input('First number: ')
    b = input('Second number: ')
    print(a + b)

main()

First number: 2
Second number: 3
23

When reading from the command line using input(), the resulting value is a string. Even if you only typed in digits. Therefore the addition operator + concatenates the strings.