WHen I use the code below and printing all the results i get this: ------ 0 1 10 11 2 3 4 5 6 7 8 9 ------ But I want ------ 0 1 2 3 4 5 6 7 8 9 10 11 ------
Thanks for helping import bsddb def addRow(key,val): db[key] = key print key, db = bsddb.btopen('test3.db','n') #maar 3 kolomen for i in range(4): addRow('%d'%(i*2+0+i),'test%d'%(i*2+0+i)) addRow('%d'%(i*2+1+i),'test%d'%(i*2+1+i)) addRow('%d'%(i*2+2+i),'test%d'%(i*2+2+i)) #----- print 'kolom1','kolom2','kolom3' p=0 for k, v in db.items(): if p == 0: p = p+1 print v, elif p == 1: p = p+1 print v, elif p == 2: p=0 print v, print -- http://mail.python.org/mailman/listinfo/python-list