Advertisement
GastonPalazzo

List & Dict - Listas - Ej-1

Aug 22nd, 2020
71
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 1|')
  2.  
  3. animales=['perro', 'gato', 'loro', 'jirafa', 'vaca', 'tigre', 'ciervo', 'bufalo', 'cocodrilo', 'leon']
  4.  
  5. for i in animales:
  6.     if 2<animales.index(i)<6: print(f'\nAnimal {animales.index(i)} -> {i}')
  7.  
  8. print('\nFin de la ejecucion!\n')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement