newlist=() list=(('CAKE', (748.0, '07-09-2020')), ('JELLY', (12.0, '07-09-2020')), ('CREAM', (244.0, '03-11-2020'))) for element in list: newitem = (element[0], (element[1][1], element[1][0])) newlist = newlist + newitem print(newlist)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)