Extract integer from list using python -


extract integer list

test = query_database("select sum(try) tries number=?", (nb,)) print test  

the result got [(100,)]

and when extract value list :

for in test:       print 

the result (100,)

how extract 100 integer no parenthesis , commas ?

since list consists of tuples have first tuples value in tuple this

for in test:      j in i: #itertae tuple list          print(j) 

Comments

Popular posts from this blog

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

arrays - Algorithm to find ideal starting spot in a circle -