Last active
March 21, 2021 21:10
-
-
Save andeoliveira/89aef89754e58d63123177561ec64bf9 to your computer and use it in GitHub Desktop.
Alterar um elemento de uma Lista Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Alterar um item da Lista Python | |
lista_bandas = ["Metallica","AC/DC","The Who","Ramones"] | |
lista_bandas[3] = "The Beatles" #Acessa elemento de índice 3 e altera o valor do item | |
print(lista_bandas) #Alterado a banda Ramones por The Beatles ['Metallica', 'AC/DC', 'The Who', 'The Beatles'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment