I am struggling with the following problem:
I want to convert an OrderedDict
like this:
OrderedDict([('method', 'constant'), ('data', '1.225')])
into a regular dict like this:
{'method': 'constant', 'data':1.225}
because I have to store it as string in a database. After the conversion the order is not important anymore, so I can spare the ordered feature anyway.
Thanks for any hint or solutions,
Ben
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…