Skip to content

Instantly share code, notes, and snippets.

@andeoliveira
Created March 21, 2021 22:32
Show Gist options
  • Save andeoliveira/260bc015bd328af130e1d1bd22301770 to your computer and use it in GitHub Desktop.
Save andeoliveira/260bc015bd328af130e1d1bd22301770 to your computer and use it in GitHub Desktop.
Acessa um elemento de uma tupla Python
#Acessa um item da tupla no Python
tupla_bandas = ("Metallica","AC/DC","The Who","Ramones")
banda_metallica_tupla = tupla_bandas[0] # acessa o elemento da posição 0 "Metallica"
print(banda_metallica_tupla) #Metallica
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment