Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created June 23, 2018 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fhernd/0f5b43f2c302f9dca9f50f6139043047 to your computer and use it in GitHub Desktop.
Save Fhernd/0f5b43f2c302f9dca9f50f6139043047 to your computer and use it in GitHub Desktop.
Uso de la función enumerate() para obtener los índices y los valores de una secuencia. OrtizOL.
nombres = ['Raskolnikov', 'Michkin', 'Fomma']
for idx, val in enumerate(nombres):
print('Índice: {} - Valor: {}'.format(idx, val))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment