代码如下
def name(x):
while 1:
if x=="name1":
print "hello "+x
elif x=="neme2":
print "hello "+x
else:
print ">.<\n请输入name1或者name2"
if x == "name1" or name =="name2":
return "yo,boy"
s=raw_input("输入你的名字:\n")
name(s)
一旦输入的不是name1或者name2就会一直执行 print ">.<\n请输入name1或者name2"
请问应该怎么修改
相关分类