python array set key value code example Example: python array set key value myDict = {} myDict["john"] = "johns value" myDict["jeff"] = "jeffs value"