# -*- coding: utf-8 -*- | |
# https://www.cyberforum.ru/python-beginners/thread2510792.html | |
with open("attack.txt", "rt") as file: | |
text = file.read() | |
for digit in "6789": | |
print(f"{digit} {text.count(digit)}") | |
# 6 354 | |
# 7 383 | |
# 8 359 | |
# 9 344 |
# -*- coding: utf-8 -*- | |
# https://www.cyberforum.ru/python-beginners/thread2510792.html | |
with open("attack.txt", "rt") as file: | |
text = file.read() | |
for digit in "6789": | |
print(f"{digit} {text.count(digit)}") | |
# 6 354 | |
# 7 383 | |
# 8 359 | |
# 9 344 |