From my database, I'm returning a list to be displayed into my HTML page but my list has this unwanted symbols. I tried using split()
function but it wont work. How can I remove those parenthesis,commas and quotes. Thanks for you help
The output is :
[('cenomar',), ('cedula',), ('Birth Certificate',), ('Clearance',)]
I want:
[cenomar, cedula, Birth Certificate, Clearance]
Here is my python function:
@app.route('/')
def search():
conn=psycopg2.connect("dbname='forms' user='postgres' password='everboy'
host='localhost' port='5432'")
cur=conn.cursor()
cur.execute("SELECT name from form")
rows=cur.fetchall()
print(rows)
return render_template("form.html",rows=rows)