输入为真时,循环仍在继续

I'm a beginner and doing a simple project about library system(no data base).There is a variable"choice".If choice=="1"or"2",it will take action.

I set a while loop when choice!= "1"or"2" so i can input until
choice=="1"or"2" and take action.I need to know how to break the loop when choice=="1” or"2“.It keep repeating the loop when action is finish.

This is the output

评论