“dictionnaire en python” Réponses codées

dictionnaire python

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

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

dictionnaire en python

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

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

dictionnaire en 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

dictionnaire en 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

Dictionnaire en python

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

dictionnaire en python

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

Réponses similaires à “dictionnaire en python”

Questions similaires à “dictionnaire en python”

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code