Looping on a list in json
Sayth Renshaw
flebber.crue at gmail.com
Sun Nov 5 01:36:04 EDT 2017
no doubt tho after playing with this is that enumerate value ends up in the output which is a dictionary. The enumerate has no key which makes it invalid json if dumped.
Not massive issue but getting the effect of enumerate without polluting output would be the winner.
>runner_lists = {}
> for n, item in enumerate(result):
> # if this one is interested / not -filtered:
> print(n, item)
> runner_lists[n] = result[n]["RacingFormGuide"]["Event"]["Runners"]
Sayth
More information about the Python-list
mailing list