The following has been collected using re.sub. You need to add "1": "2": "3" in front of each {}. How to write this:
'{"nClass":-1,"nIcon":16},{"nClass":-1,"nIcon":15},{"nClass":-1,"nIcon":14}'
final effect:
'“1”:{"nClass":-1,"nIcon":16},“2”:{"nClass":-1,"nIcon":15},“3”:{"nClass":-1,"nIcon":14}'
Your description is not clear enough. You said the result should be a list. Do you want to convert it to a dict?