Created
August 25, 2019 19:21
-
-
Save christiancost47/2ff168c4402a2f149580f7acd4b46548 to your computer and use it in GitHub Desktop.
removing_stuff
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
#>>>> Removendo itens pela posição | |
empresas_tecnologia = ['tesla', 'google', 'dropbox', 'apple', 'nubank'] | |
del empresas_tecnologia[0] #deleta o index 0 | |
>>>['google', 'dropbox', 'apple', 'nubank'] | |
del empresas_tecnologia[2] #deleta o index 2 | |
>>>['google', 'dropbox', 'nubank'] | |
#>>>>Removendo itens pelo valor | |
empresas_tecnologia = ['tesla', 'google', 'dropbox', 'apple', 'nubank'] | |
empresas_tecnologia.remove('dropbox') #remove o valor 'dropbox' | |
>>>['tesla', 'google','apple', 'nubank'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment