Advertisement
teslariu

zip

Nov 16th, 2021
1,200
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. # -*- coding: utf-8 -*-
  3. #
  4. notas = [10,8,7,5,9]
  5. alumnos = ["Ana", "Tito","Jose","Juana","Cecilia"]
  6.  
  7. for alumno, nota in zip(alumnos,notas):
  8.     print(alumno, nota)
  9.    
  10. for i, alumno in enumerate(alumnos):
  11.     print(i+1, alumno)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement