Skip to content

Instantly share code, notes, and snippets.

View victorjabur's full-sized avatar

Victor Hugo Jabur Passavaz victorjabur

View GitHub Profile
@victorjabur
victorjabur / python_dicts.py
Created August 22, 2016 00:28
Python - Explorando Dicionários
# 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'
@victorjabur
victorjabur / python_list.py
Last active August 21, 2016 21:16
Python - Explorando a classe list
# 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)]