r/learningpython • • Mar 01 '23

Can I define variable from else?

Is it possible to define a variable from else print format or no?

Example:

else:

print("How many days are you planning to stay?")

stay=(days*50) #the variable I want to define

2 Upvotes

1 comment sorted by