在python中檢測函數錯誤,具體方法如下:
x = 0lis_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+=1except:print ('Error')
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')
億速云公眾號
手機網站二維碼
Copyright ? Yisu Cloud Ltd. All Rights Reserved. 2018 版權所有
廣州億速云計算有限公司粵ICP備17096448號-1 粵公網安備 44010402001142號增值電信業務經營許可證編號:B1-20181529