How to I convert a string that contains a list of sets to list without changing the order of the sets?
I have a string that contains a list of sets – ‘[{13,18},{14,19}]’ I want it to be like this – [‘[13,18]’,'[14,19]’] When I use ast.literal_eval() the order of the sets gets changed – >>> >>> l1='[{13,18},{14,19}]’ >>> >>> >>> ast.literal_eval(l1) [{18, 13}, {19, 14}] >>> Please suggest how can I keep the order of the… Read More How to I convert a string that contains a list of sets to list without changing the order of the sets?