Here is my code:
def chose_range():
while True:
choice = int(input("Choose the range 100 or 1000:"))
if choice == 100:
n = 100
break
elif choice == 1000:
n = 1000
break
else:
print('Error, enter the right number')
return n
I want to save result of this command into the variable. How can I do this in python 3?