import psycopg2           
c=psycopg2.connect(host="localhost",dbname="COMUN",user="postgres",password="Visual2021")           
cur=c.cursor()           
cur.execute("select table_name from information_schema.tables where table_schema=%s order by 1")           
[print(r[0]) for r in cur.fetchall()]           
