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

Delete cse16259_e3_2.py

parent eab9c20f
No related branches found
No related tags found
No related merge requests found
Pipeline #169 canceled
d = {}
fname = input("Enter the name of the file:")
with open(fname, 'r') as f:
line = f.readline()
while line:
line = line.strip()
end = line.find('/', 3)
category = line[3: end]
if category not in d:
d[category] = 0
d[category] = d[category] + 1
line = f.readline()
for (category,cnt) in d.items():
print(category, cnt)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment