while循環示例

while循環示例:python

vi aa.py

#!/usr/bin/pythonide

flag=True
while flag:
input_str=input("please input something, 'q' for quit. ->")
print "your input is %s" % input_str
if input_str='q':
flag=False
print("You are out of circulation.")ui

:wqci

python aa.py

相關文章
相關標籤/搜索