You've already forked Curso-lenguaje-python
Restructure content and add notes from HolaMundo
Signed-off-by: Manuel Vergara <manuel@vergaracarmona.es>
This commit is contained in:
14
python-total/dia_04/08_zip.py
Normal file
14
python-total/dia_04/08_zip.py
Normal file
@@ -0,0 +1,14 @@
|
||||
"""
|
||||
Zip
|
||||
"""
|
||||
|
||||
nombres = ['Ana','Hugo','Valeria']
|
||||
edades = [65,29,42,55]
|
||||
ciudades = ['Lima','Madrid','Mexico']
|
||||
|
||||
# Cuidao, zip guarda las listas con el numero mínimo de las listas
|
||||
|
||||
combinados = list(zip(nombres,edades, ciudades))
|
||||
|
||||
for nombre,edad,ciudad in combinados:
|
||||
print(f'{nombre} tiene {edad} años y vive en {ciudad}')
|
||||
Reference in New Issue
Block a user