Dictionary and Attribute OperatorsOperations on Dictionariesx = d[k] Lookup by key d[k] = x Assignment del d[k] Delete an item len(d) Number of items in dictionary a = d['name'] d['email'] = "beazley@cs" del d['phone'] Attribute Operator (.)
|
<<< | O'Reilly OSCON 2000, Introduction to Python, Slide 59 July 17, 2000, beazley@cs.uchicago.edu |
>>> |