Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. def dias_libres(archivo):
  4.     dictNuevo = {}
  5.    
  6.     dias = open(archivo, 'r')
  7.    
  8.     for linea in dias:
  9.         tmp = linea.strip().split()
  10.         mes = tmp[0]
  11.        
  12.         dictNuevo[mes] = len(tmp[1:])
  13.        
  14.     dias.close()
  15.    
  16.     return dictNuevo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement