Answers for "convert dict to ordereddict"

0

get first element of ordereddict

list(ordered_dict.items())[0]
Posted by: Guest on April-28-2020
0

python Ordered dict to dict

>>> from collections import OrderedDict
>>> dict(OrderedDict([('method', 'constant'), ('data', '1.225')]))
{'data': '1.225', 'method': 'constant'}
Posted by: Guest on July-08-2020

Python Answers by Framework

Browse Popular Code Answers by Language