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

php - Autoloader issue not returning Class -

ruby - Prevent Custom Validation Error on Association -

ruby on rails - Scope conditionals for count? -