Hallo,
ich bin voll neu im Python-Programming, deshalb ist mein Problem wahrscheinlich trivial:


Wenn ich die Script
#########################################33
#! /usr/bin/env python
import MySQLdb
db=MySQLdb.connect(host='localhost', db='photum_0_6_2', user='root', passwd='thkhgfgd')
c=db.cursor()
c.execute('select person from persons order by person')
tup=c.fetchall()
for a in tup:
print a
################################################
ausführe, erhalte ich Dinge wie
('Dieter',)
('Hulda',)
....


Ich brauche die Klammern, Apostrphe und Kommas nicht (ich will nur die Inhalte) und kann ich sie nicht loswerden. Versucht habe ich u. a. print a[2:-3] was nur zwei Klammern bringt.
b=lstrip(a, "(") haut auch nicht hin.
Weiss jemand Rat?


P.S. Woher kommen diese Klammern und Apostrophen, vom MySQLdb?
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to