Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def numero_alumnos(archivo):
- fp=open(archivo+".txt")
- linea=fp.readline()
- D=dict()
- while linea:
- for i in range(3,len(linea.split())):
- if linea.split()[i] in D:
- D[linea.split()[i]]+=1
- else:
- D[linea.split()[i]]=1
- linea=fp.readline()
- return D
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement