Answers for "python dict +="

0

python dict

>>> d = {}
>>> d
{}
>>> d = {'dict': 1, 'dictionary': 2}
>>> d
{'dict': 1, 'dictionary': 2}
Posted by: Guest on November-09-2021
0

python dict

# A dict (dictionary) is a data type that store keys/values

myDict = {"name" : "bob", "language" : "python"}
print(myDict["name"])

# Dictionaries can also be multi-line
otherDict {
	"name" : "bob",
    "phone" : "999-999-999-9999"
}
Posted by: Guest on February-22-2022

Python Answers by Framework

Browse Popular Code Answers by Language