Advertisement
GastonPalazzo

List & Dict - Listas - Ej-9

Aug 22nd, 2020
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. print('|Ej 9|\n')
  2.  
  3. lista_inicial = [5, 3, 1, 2, 4]
  4.  
  5. lista_cuadrado = []
  6.  
  7. for i in lista_inicial:
  8.     print(f'{i} * {i} = ', end='')
  9.     lista_cuadrado.append(i**2)
  10.     print(lista_cuadrado[len(lista_cuadrado)-1])
  11.  
  12. print('\nFin de la ejecucion!\n')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement