rs=dict() rs['item1'] = 'item1' rs['item2'] = 'item2' for k,d in rs.items(): print k,d for k in rs.keys(): print k,rs[k]