I am creating a calculator and I place the numbers taken by the user into a list.I had to make the input a string since I place the input in a while
loop and gave it a string to break the loop (q
).
while True:
numbers = input('Enter the numbers for calculation: ')
if numbers == 'q':
break
operations.append(numbers)
I want to turn the list where the user's input is kept into a float so that I can perform operations on them.
This is the list: operations = []