文章摘要:python怎么检测函数错误 python如何检查错误
在python中检测函数错误,具体方法如下: x = 0 lis_y = [i for i in range( […]
在python中检测函数错误,具体方法如下:
x = 0
lis_y = [i for i in range(64,90)]
def test(x,y):
print (x+y)
def test1(x,y):
print( x*y)
try:
while x < 20:
for y in lis_y:
test(x,y)
test1(x,chr(y))
x+=1
except:
print ('Error')