vanakkam
vanakkam

Reputation: 11

extract value from a set in python

here is the output in sql query output in set format in python. how to extract just the value to a variable ResultSet({'(u'tx', None)': [{u'value': 31399946096.0, u'time': u'2016-10-05T05:06:15.009545466Z'}]})

i need v=31399946096.0

thanks

Upvotes: 0

Views: 470

Answers (1)

vanakkam
vanakkam

Reputation: 11

I tried this way to get it the value out:

result=({'(u'tx', None)': [{u'value': 31399946096.0, u'time': u'2016-10-05T05:06:15.009545466Z'}]})

r=list(result)  
for i in r:  
    print i[0]['value']  

which yields 31399946096.0. Is there any other way?

Upvotes: 1

Related Questions