Dictionary Keys Are Case-Sensitive : Dictionary Key « Dictionary « Python






Dictionary Keys Are Case-Sensitive

Dictionary Keys Are Case-Sensitive
 

d = {} 
d["key"] = "value" 
d["key"] = "other value"  
print d 

d["Key"] = "third value"  
print d 
{'Key': 'third value', 'key': 'other value'} 
           
         
  








Related examples in the same category

1.Use variable as a keyUse variable as a key
2.Dictionary: create a new list of keysDictionary: create a new list of keys
3.For loop through the dictionary keysFor loop through the dictionary keys
4.Dictionary: The keys, values, and items FunctionsDictionary: The keys, values, and items Functions
5.Sorting Keys: for Loops