Code: Alles auswählen
line = []
for x in self.connection[ count ]:
id = x[ len(x)-1 ]
command = "SELECT * FROM `fluege` WHERE `start` = '%s' OR `ziel` = '%s'" % ( id, id )
self.cursor.execute ( command )
result = self.cursor.fetchall()
for y in result:
if y[0] != id:
id2 = y[0]
else:
id2 = y[1]
neworigion = x
neworigion.append( id2 )
line.append( neworigion )
### Erste Ausgabe
print line
neworigion.pop()
### Zweite Ausgabe
print line
Code: Alles auswählen
[[4L, 58L], [4L, 58L], [4L, 58L], [4L, 58L], [4L, 58L], [4L, 58L], [4L, 58L]]
Code: Alles auswählen
[[4L], [4L], [4L], [4L], [4L], [4L], [4L]]
Wieder: Wo liegt mein Denkfehler???