import sqlite3
class class1:
def __init__(self):
self.print1()
def print1(self):
con = sqlite3.connect(\'mydb.sqlite\')
cur = con.cursor()
cur.execute(\"
the u tells you that these are unicode strings. to print the list of tuples in the format you specified you could use:
>>> myformat="['%s']"%"', '".join([t[0] for t in ar])
>>> print myformat
['arun', 'kiran', 'kulku', 'sugu']
edit:// Example for KIRAN with u and , in the result set:
>>> ar=[(u'u',), (u'u',), (u',,,u,,u,',)]
>>> myformat="['%s']"%"', '".join([t[0] for t in ar])
>>> print myformat
['u', 'u', ',,,u,,u,']