Python‎ > ‎dict‎ > ‎

dict.items()

http://www.adilwaseem.com/

Definition
Return with the items in the dictionary.

Syntax
dict.items()

Parameters
N/A

Examples
 >>> dict={'Adil':49,'John':33}
>>> dict.items()
dict_items([('John', 33), ('Adil', 49)])


str.maketrans.__eq__(dict)
Returns are:
 >>> x="1234"
>>> y="5678"
>>> z=str.maketrans(x,y)
>>> z
{49: 53, 50: 54, 51: 55, 52: 56}
>>> 
>>> z.__eq__({49: 53, 50: 54, 51: 55, 52: 56})
True
>>> z.items()
dict_items([(49, 53), (50, 54), (51, 55), (52, 56)])
>>> z.values()
dict_values([53, 54, 55, 56])



Comments