Colors for Rows
Victor Subervi
victorsubervi at gmail.com
Tue Apr 29 10:33:32 EDT 2008
Hi;
why doesn't this work?
z = 3
for d in id:
z += 1
if z % 4 == 0:
bg = '#ffffff'
elif z % 4 == 1:
bg = '#d2d2d2'
elif z % 4 == 2:
bg = '#F6E5DF'
else:
bg = '#EAF8D5'
try:
print '<tr bgcolor="%s">\n' % bg
except:
print '<tr>\n'
It never increments z! Yet, if I print z, it will increment and change the
bgcolor! Why?!
Victor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080429/a6f447b9/attachment.html>
More information about the Python-list
mailing list