Python Try的使用

a=0
while a<1:
try:
a=a+1
number=int(raw_input(“What is the number?”))
except:
print “Error!Please enter a number!”
a=a-1

本文链接:Python Try的使用

转载声明:本站文章若无特别说明,皆为原创,转载请注明来源:Krunk Zhou,谢谢!^^


Leave a Reply

Your email address will not be published. Required fields are marked *