# coding: utf-8
import cx_Oracle as ora
tns = ora.makedsn('ホスト名', 1521, 'sid')
conn = ora.connect('ユーザ名', 'パスワード', tns, encoding='utf-8')
cur = conn.cursor()
cur.execute('SELECT COL1, COL2 FROM TBLNAME')
# Python3
columnname = {desc[0]:idx for idx, desc in enumerate(cur.description)}
# Python2
# col = {}
# for (idx, desc) in enumerate(cur.description): col.update({ desc[0]:idx })
rows = cur.fetchall()
for r in rows:
# 配列番号で指定
# print("%s, %s" % (r[0], r[1]))
# カラム名で指定
print("%s %s" % (r[columnname['COL1']], r[columnname['COL2']]))
conn.close()