Referencing key-value dictionary variables
If you use a variable defined as a key-value dictionary (also called a hash), you can use individual, specific items from that dictionary using either bracket notation or dot notation:
Both of these examples reference the same value (“one”). Bracket notation always works. Dot notation can cause problems because some keys collide with attributes and methods of python dictionaries. Use bracket notation if you use keys that start and end with two underscores, which are reserved for special meanings in python, or are any of the known public attributes:
add,append,as_integer_ratio,bit_length,capitalize,center,clear,conjugate,copy,count,decode,denominator,difference,difference_update,discard,encode,endswith,expandtabs,extend,find,format,fromhex,fromkeys,get,has_key,hex,imag,index,insert,intersection,intersection_update,isalnum,isalpha,isdecimal,isdigit,isdisjoint,is_integer,islower,isnumeric,isspace,issubset,issuperset,istitle,isupper,items,iteritems,iterkeys,itervalues,join,keys,ljust,lower,lstrip,numerator,partition,pop,popitem,real,remove,replace,reverse,rfind,rindex,rjust,rpartition,rsplit,rstrip,setdefault,sort,split,splitlines,startswith,strip,swapcase,symmetric_difference,symmetric_difference_update,title,translate,union,update,upper,values,viewitems,viewkeys,viewvalues,zfill.