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
# Criando uma lista vazia | |
minha_lista = [] | |
minha_lista = list() | |
# Com alguns numeros | |
numeros = [1,2,3,4,5] | |
#numeros = list(1,2,3,4,5) # TypeError: list() takes at most 1 argument (2 given | |
# Eh possivel ter varios tipos misturados | |
mistura = [1, "1", '1', 0, -5, 100.62, [1,2,3], {1 : 2}, (1,2,3)] |
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
# Criando um dicionario vazio | |
nomes = {} | |
nomes = dict() | |
nomes = dict.fromkeys([1,2,3,4,5]) | |
# Criando um dicionario vazio e colocando 3 elementos | |
funcionarios = {} | |
funcionarios['victor'] = 'arquitetura' | |
funcionarios['bolela'] = 'integracao' | |
funcionarios['juliana'] = 'bi' |