file "test py"line in print "dict['age']"dict['age']typeerror'typeobject is unsubscriptable note del(method is discussed in subsequent section properties of dictionary keys dictionary values have no restrictions they can be any arbitrary python objecteither standard objects or user-defined objects howeversame is not true for the keys there are two important points to remember about dictionary keys more than one entry per key not allowed which meansno duplicate key is allowed when duplicate keys are encountered during assignmentthe last assignment wins for example#!/usr/bin/python dict {'name''zara''age' 'name''manni'print "dict['name']"dict['name'when the above code is executedit produces the following resultdict['name']manni keys must be immutable which means you can use stringsnumbers or tuples as dictionary keysbut something like ['key'is not allowed an example is as follows#!/usr/bin/python dict {['name']'zara''age' print "dict['name']"dict['name'when the above code is executedit produces the following resulttraceback (most recent call last)file "test py"line in dict {['name']'zara''age' }typeerrorlist objects are unhashable