Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def count_holes(n):
- if type(n) != int or type(n) != str:
- return "ERROR"
- n=n.lstrip('0')
- for i in n:
- result=0
- if i in "0469":
- result += 1
- elif i == "8":
- result +=2
- return result
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement