“Словарь в Python” Ответ

Словарь Python

human = {
  "code": "Python",
  "name": "John",
  "age": 32
}

print(human["age"])
#32 :D
The Cat Coder

Словарь в Python

Polygon = {
	"PolygonName" : "Tetrahectaseptadecagon"
	"PolygonSides" : 417
}

print("A", (Polygon["PolygonName"]) "has", (Polygon["PolygonSides"]), "sides")
Rick Astley

Словарь в Python

myDict = {
    "Fast": "In a Quick Manner",
    "Hasya": "A Coder",
    "Marks": [1, 2, 5],
    "anotherdict": {'hasya': 'Player'}
}

# print(myDict['Fast'])
# print(myDict['Hasya'])
myDict['Marks'] = [45, 78]
print(myDict['Marks'])
print(myDict['anotherdict']['hasya'])
Coding boy Hasya

Словарь в Python

#a dictionary
dict = {
  "key": "value",
  "other_key": "value"
}

#get a value from the dictionary using the key
print(dict["key"])

#you can also get a value from the dictionary using a normal index:
print(dict[1])
Poor Pony

Словарь в Python

dict1={1:"Tutorials",2:"Point",3:1116}
print("Dictionary 1",dict1)
dict2={1:"TutorialsPoint","TP":"DictionaryTutorial"}
print("Dictionary 2",dict2)
MARIANA ESQUIVEL

Словарь в Python

Dict = {"name": 'Izhaan', "salary": 1234, "age": 23} 
print("\nDictionary with the use of string Keys: ") 
print(Dict)
Bored Buzzard

Ответы похожие на “Словарь в Python”

Вопросы похожие на “Словарь в Python”

Больше похожих ответов на “Словарь в Python” по Python

Смотреть популярные ответы по языку

Смотреть другие языки программирования