Skip to content
Snippets Groups Projects
Commit b11a5ee8 authored by PRANESH's avatar PRANESH
Browse files

comment

parent 0522e156
No related branches found
No related tags found
No related merge requests found
count = {}
f = open('/home/student4/lab/sw.txt')
l = f.readline()
while l:
l = l.strip()
if l in count:
count[l] += 1
else:
count[l] = 1
l = f.readline()
print(count)
d = {}
sun = [[0]]
f = open('/home/student4/lab/sun.txt','r')
r = f.readlines()
for i in r:
sun.append(list(i.split('/')))
for i in sun:
if(len(i)<2):
continue
j = i[2]
if(j in d):
d[j]+=1
else:
d[j]=1
for i in d:
print(i,d[i])
sun.txt 0 → 100644
This diff is collapsed.
sw.txt 0 → 100644
Darth
Luke
Darth
Lea
Darth
Lea
Lea
Luke
Darth
Lea
Darth
Darth
Lea
Lea
Darth
Lea
Darth
Lea
Luke
Darth
Lea
Lea
Darth
Lea
Darth
Darth
Lea
Lea
Luke
Luke
Lea
Darth
Darth
Luke
Lea
Darth
Darth
Lea
Lea
Lea
Lea
Lea
Luke
Darth
Luke
Lea
Lea
Lea
Lea
Luke
Lea
Darth
Lea
Lea
Darth
Lea
Lea
Darth
Darth
Lea
Darth
Lea
Darth
Luke
Lea
Luke
Darth
Darth
Luke
Darth
Lea
Darth
Lea
Luke
Lea
Lea
Lea
Lea
Lea
Darth
Lea
Lea
Lea
Lea
Lea
Lea
Lea
Luke
Lea
Lea
Lea
Lea
Lea
Lea
Darth
Luke
Darth
Lea
Lea
Darth
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment