“Python Crie dicionário” Respostas de código

Criar dicionário

hh = {"john":3, "mary":4, "joe":5}
print(hh)
# {'joe': 5, 'john': 3, 'mary': 4}
Sore Sloth

Python Crie dicionário

dictionary_name = {key: value}
GarbageCollector

Criando um dicionário

# Creating a Dictionary
# with Integer Keys
Dictionary = {0: 'Softhunt', 1: '.net', 2: 'By', 3: 'Ranjeet'}
print("\nDictionary with the use of Integer Keys: ")
print(Dictionary)

# Creating a Dictionary
# with Mixed keys
Dictionary = {'Name': 'Ranjeet Kumar Andani', 1: [0, 1, 2, 3, 4, 5]}
print("\nDictionary with the use of Mixed Keys: ")
print(Dictionary)
Outrageous Ostrich

Respostas semelhantes a “Python Crie dicionário”

Perguntas semelhantes a “Python Crie dicionário”

Procure respostas de código populares por idioma

Procurar outros idiomas de código