Imagine we have a list of strings with defined structure.
What would be the simplest strategy to parse such a list to get a dictionary?
mylist = [
'????Zynex 0,6',
'????PayPal 11',
'????PetIQ 0,5',
'????First Solar 0,7',
'????Upwork 1%',
'????NV5 Global 0,8',
'????TPI Composites 1',
'????Fiserv 0,5',
]
And I'm looking to get the result:
{
'Zynex': 0.6,
'PayPal': 11.0,
'PetIQ': 0.5,
'First Solar': 0.7,
'Upwork': 1.0,
'NV5 Global': 0.8,
'TPI Composites': 1.0,
'Fiserv': 0.5,
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…