def checkio(*args):
min_element = min(args)
max_element = max(args)
diff = 0
if len(args) != 0:
diff = max_element - min_element
return diff
else:
return 0
Stuck with this code on an empty sequence check and getting this type of error:
ValueError: min() arg is an empty sequence
checkio, 2
<module>, 23
However, I wrote the condition, which filters 0 element argument list.
I need some help!
Created at: 2019/07/09 14:11; Updated at: 2019/07/09 15:17