> 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
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
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
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