I have a python dict like so:
tt={'plot1':[
{'var': 'ok__you', 'uuid': '98782098109'},
{'var': 'hdg__akj', 'uuid': '712837901'}
],
'plot2': [
{'var': 'ok__you2', 'uuid': '987820981092'},
{'var': 'hdg__akj2', 'uuid': '7128379012'}
]}
I am trying to get all the uuids
into one single list, so, I do:
lst=[v_i['uuid'] for v_i in value for key,value in tt.items()]
and I get thrown:
NameError: name 'value' is not defined
I have no clue why this is - I have specified the value
in the tt.items()
iteration - not sure why this error is being thrown?
Would apreciate any tips!