Advertisement
Guest User

lavrga

a guest
Feb 23rd, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. # Obtener las entradas
  2. cantidadDeVotantes = int(input())
  3. votantesRegistrados = input().split() # Retorna una lista
  4. cantidadDeVotantesPresentados = int(input())
  5. votantesPresentados = input().split() # Retorna una lista
  6.  
  7. # Filtrar los votantes registrados
  8. votantesNoRegistrados = list(filter(lambda x: not x in votantesRegistrados, votantesPresentados))
  9. cantidadDeVotantesNoRegistrados = len(votantesNoRegistrados)
  10.  
  11. # Formatear votantesNoRegistrados
  12. votantesNoRegistrados = ' '.join(value for value in votantesNoRegistrados )
  13.  
  14. # Imprimir salidas
  15. print(cantidadDeVotantesNoRegistrados)
  16. print(votantesNoRegistrados)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement