Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- result = 0
- text = str(list(range(101)))
- for char in text:
- if char == "7":
- result += 1
- print('result:', result)
- # or
- text = str(list(range(101)))
- result = text.count("7")
- print('result:', result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement