I´m doing a small work for college and i need to stop a certain input when u entered a certain word in python?
I tried this but it isn´t working
if (entrance == 'STOP'):
break;
CodePudding user response:
FIrst of all always provide the maximum information you can about your question. Secondly the brackets around the if conditional and the semi column are redundant in python.
For your problem, try using while loops to test the input of the user. Something like,
while input() != 'STOP':
# insert code here