I'm trying to make a program that adds the input, which will be in the form of '7 5 4 1' etc with a space between each number, and will add 7, 5, 4 and 1 for the output. So far I've got nothing working.
x = []
inp = int(input('Enter the expenses: '))
x.extend(inp.split())
print((sum)(x))
Any help would be appreciated