On Aug 27, 2:37 pm, TYR <[EMAIL PROTECTED]> wrote:
> There's always the naive option.
>
> query = ('species', 'lifestyle', 'coolness', 'tentacles=>8')
> db.execute('SELECT %s, %s, %s % FROM creatures WHERE %s;' % query)
> record = dict(zip((query), (db.fetchall()))
> array = '''{
> '''
> for k,v in record:
> array.append('"(k)":"(v)"')
> array.append('''
> }''')
Actually, don't.
query = ('species', 'lifestyle', 'coolness')
limit = ('tentacles=>8')
--
http://mail.python.org/mailman/listinfo/python-list