Skip to content
Snippets Groups Projects
Commit 8b64f3ef authored by Pravesh's avatar Pravesh
Browse files

Upload New File

parent 0b3bdf93
Branches
No related tags found
No related merge requests found
Pipeline #178 failed
path='/home/student4/sun.txt'
sun_file=open(path,'r')
categories = {}
line = sun_file.readline().strip().split("/sun_")
category = line[0][3:]
while len(category)>0:
if category in categories.keys():
categories[category]+=1
else:
categories[category]=1
line = sun_file.readline().strip().split("/sun_")
category = line[0][3:]
print(categories)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment