Very confusing. I am afraid that your description of the problem is contradictory.
However, your immediate problem is very simple and resides in line #11. To demonstrate what happens and what you probably want consider this:
...and if 'results' is really generator which emits 'list of dictionaries' then applying
...and your sample output is not list of dictionary values, these are dictionary keys
...and dictionaries have dict.values() method
However, your immediate problem is very simple and resides in line #11. To demonstrate what happens and what you probably want consider this:
>>> a = 'oh' >>> b = 'my' >>> a + b 'ohmy' >>> list(a + b) # equivalent of your row #11 ['o', 'h', 'm', 'y'] >>> [a, b] # this is what you probably want ['oh', 'my']But of course, you don't need to create variables for just adding them into list not to mention that converting strings into strings doesn't make sense.
...and if 'results' is really generator which emits 'list of dictionaries' then applying
initialParse()
on it fails miserably as lists don't have keys ...and your sample output is not list of dictionary values, these are dictionary keys
...and dictionaries have dict.values() method
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.