Nov-24-2018, 04:35 PM
If you want it that way, you can just create a new dict and append it to the list:
result = [] for line in lines: name = line['name'] del line['name'] result.append({name: line}]
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures