Answers for "how to parse dictionary to list in python"

4

python dictionary to list

>> d = {'a': 'Arthur', 'b': 'Belling'}

>> d.items()
[('a', 'Arthur'), ('b', 'Belling')]

>> d.keys()
['a', 'b']

>> d.values()
['Arthur', 'Belling']
Posted by: Guest on July-18-2021
0

convert string to list of dictionaries

import ast
ast.literal_eval(string_data)
Posted by: Guest on May-18-2020

Code answers related to "how to parse dictionary to list in python"

Python Answers by Framework

Browse Popular Code Answers by Language