python中while循环
2021-06-11 13:05
标签:pre int print color 循环 please inpu rgba code 1、 2、 python中while循环 标签:pre int print color 循环 please inpu rgba code 原文地址:https://www.cnblogs.com/liujiaxin2018/p/14222524.html>>> 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
>>> 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
>>>