Mar-11-2022, 01:18 PM
Hi all,
I'm trying to print variable between " (double quotes) .
Code is below:
I'm trying to print variable between " (double quotes) .
Code is below:
import cx_Oracle as oracledb import xml.etree.ElementTree as ET def output_type_handler(cursor, name, default_type, size, precision, scale): if default_type == oracledb.CLOB: return cursor.var(oracledb.LONG_STRING, arraysize=cursor.arraysize) if default_type == oracledb.BLOB: return cursor.var(oracledb.LONG_BINARY, arraysize=cursor.arraysize) conn = oracledb.connect("/", mode=oracledb.SYSASM) conn.outputtypehandler = output_type_handler prev_name = None cursor = conn.cursor() cursor.execute("select cellname, confval from v$cell_config where conftype='CELL' order by cellname desc") print (cursor) for val in cursor: print('"%s"' % val) print("\n #########################################")I tried {val}, [val], between commas and without but cannot get it. I would need """ (3 double quotes) at the beggining and at the end of variable output.