I've trying to create a list with the results from a column. I execute the query and the result are okay, but when I input the data in a list using list.append they return just [].
import cx_Oracle
con = cx_Oracle.connect('user/psw@localhost')
cur = con.cursor()
list = []
cur.execute('select column from table')
for result in cur.fetchall():
list.append
print (list)
cur.close()
con.close()
Return:
[]
[]
[]
When I put the results in to a list and return an index, like results[0] they just print the first letter of the results like:
E
X
A
M
P
L
E
When I just expecting:
Example
There's something wrong with my code? Best Regards, community!