Re: Damn error!

2007-12-24 Thread Tim Chase
> def print_tabela(tabela): > print "Tabela 1 | Tabela 2" > for linha in tabela: > tmp = linha.split(":") in here, insert this: print len(tmp), > print tmp[0] + " | " + tmp[1], I also think you may not want the tra

Re: Damn error!

2007-12-24 Thread Steven D'Aprano
On Mon, 24 Dec 2007 04:30:50 -0800, Vaurdan wrote: > Hello, > I've this code: > def print_tabela(tabela): > print "Tabela 1 | Tabela 2" > for linha in tabela: > tmp = linha.split(":") > print tmp[0] + " | " + tmp[1], > > But give me this err

Re: Damn error!

2007-12-24 Thread Guilherme Polo
Em 24/12/07, Vaurdan<[EMAIL PROTECTED]> escreveu: > Hello, > I've this code: > def print_tabela(tabela): > print "Tabela 1 | Tabela 2" > for linha in tabela: > tmp = linha.split(":") > print tmp[0] + " | " + tmp[1], > > But give me thi

Re: Damn error!

2007-12-24 Thread Florencio Cano
One linha in tabela doesn't have the syntax "something:something" so split() returns a 0 or 1 sized list and tmp[0] or tmp[1] points outside the list. 2007/12/24, Vaurdan <[EMAIL PROTECTED]>: > Hello, > I've this code: > def print_tabela(tabela): > print "Tabela 1 | Tabela 2" > for