mass editing for keys in a dictionary

james_027 cai.haibin at gmail.com
Fri Sep 14 02:56:17 EDT 2007


hi,

How could I transform something like this

dict_1 = {'customer_id':1, 'item_id':3, amount:100}

into

dict_2 = {'customer':1, 'item':3, amount:100}

thanks
james




More information about the Python-list mailing list