File size: 250 Bytes
4e1f064
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- 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