ked to musi byt cez yield tak to moze byt napr. takto
def foo(data):
for idx in range(len(data)):
yield [str(idx % 2)] + data[idx]
post_data = [["nazev1","text1"],["nazev2","text2"]]
print "".join(["<br />".join('<span class="color'+color_idx+'">' +
nazev + " - " + text + '</span>' for color_idx, nazev, text in
foo(post_data))])
urcite su aj krajsie a elegantnejsie riesenia
S.
Quoting [EMAIL PROTECTED]:
> Vůbec se mi to nedaři vyřešit :(
> _______________________________________________
> Python mailing list
> [email protected]
> http://www.py.cz/mailman/listinfo/python
>
--
application/x-person
_______________________________________________
Python mailing list
[email protected]
http://www.py.cz/mailman/listinfo/python