1、
>>> a = ""
>>> while a != "quit":
a = input("please input a str or 'quit' to leave: ")
print(a)
please input a str or 'quit' to leave: 100
100
please input a str or 'quit' to leave: abc
abc
please input a str or 'quit' to leave: quit
quit
2、
>>> a = ""
>>> while a != "quit":
a = input("please input a str or 'quit' to leave: ")
if a != "quit":
print(a)
please input a str or 'quit' to leave: 200
200
please input a str or 'quit' to leave: abc
abc
please input a str or 'quit' to leave: quit
>>>