about dictionary
This commit is contained in:
parent
a74ff549c1
commit
bac2e4e80b
9
data_structure/dictionary.py
Normal file
9
data_structure/dictionary.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Um dicionário é um conjunto de pares chave:valor, onde cada chave tem um valor correspondente.
|
||||
|
||||
team = {"neymar" : "psg", "benzema" : "real madrid", "cristiano ronaldo" : "united"}
|
||||
print(team["neymar"])
|
||||
|
||||
# Adcionando item ao dicionário
|
||||
|
||||
team["messi"] = "psg"
|
||||
print(team["messi"])
|
Loading…
Reference in a new issue