teslariu

zip

Jun 1st, 2022
977
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # como imprimir varias listas juntas
  5. nombres = ["Ana","Juana","Hector"]
  6. notas = [8,9,9]
  7. dni = [38_258_215,25_222_158,44_058_069]
  8.  
  9. for nombre, nota, nro in zip(nombres,notas,dni):
  10.     print(f"{nombre:<8}{nota:>3}{nro:>10}")
  11.  
Advertisement
Add Comment
Please, Sign In to add comment