Python - While Loop
How can you modify this code to stop the loop when the user enters 'exit'?
user_input = ''
while user_input != 'exit':
user_input = input('Enter command: ')How can you modify this code to stop the loop when the user enters 'exit'?
user_input = ''
while user_input != 'exit':
user_input = input('Enter command: ')user_input is not 'exit'.user_input is updated from user input each time.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions