输出的结果就是none
def my_ads(x):
if not isinstance(x,(int,float)):
print('param tyope error.')
return none
if x>=0:
return x
else:
return -x
print(my_abs(123))
param type error.
None
def my_ads(x):
if not isinstance(x,(int,float)):
print('param tyope error.')
return none
if x>=0:
return x
else:
return -x
print(my_abs(123))
param type error.
None
2021-11-11
举报