while True:
user_input_1 = input("")
if user_input_1 == 'yes':
print('Cont..')
# Do something
if checkcondition_1 == True:
# Do something
user_input_2 = input("")
if user_input_2 == yes:
# Do something
if user_input_2 == no:
# Do something
else:
print("Going back")
continue
if user_input_1 == 'no':
user_input_3 = input("")
if user_input_3 == 'yes':
break
if user_input_3 == 'no':
# I need help to go back to "User_Input_1 == 'yes'
Go all the way back to "user_input_1" =='yes' condition.
Is it possible to go back like that?
As I have mentioned comments above, after user_input_3
, if that condition equals to "no", I want to go all the way back up to user_input_1 == 'yes'
.
When I say continue
after that statement, it only goes back to user_input_1 == 'no'
. How can I go back up one more in while
statement? Any suggestion would be great.