Skip to content
Snippets Groups Projects
Commit bf1b32b1 authored by aslesha's avatar aslesha
Browse files

Add new file

parent 9e38f7b5
No related branches found
No related tags found
No related merge requests found
Pipeline #170 canceled
counter_dict = {}
with open('names.txt') as f:
line = f.readline()
while line:
line = line.strip()
if line in counter_dict:
counter_dict[line] += 1
else:
counter_dict[line] = 1
line = f.readline()
print(counter_dict)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment