/* */

Thursday, 24 March 2011

dictionary functions

len(d) - returns number of items (key-value pairs) in d
d[k] - returns the value associated with the key 'k'
d[k]= v - assigns the value 'v' to key 'k'
k in d - checks if the key 'k' is in dictionary 'd'

No comments:

Post a Comment