list iteration if statement

alex goretoy aleksandr.goretoy at gmail.com
Fri Jan 2 20:52:04 EST 2009


Hello All,

I'm doing this in my code

[[v.append(j) for j in i] for i in self.value]

if works and all, but I need to add a if statement in the mix. Can't seem to
remember the syntax to do so and everything I've tried seems to fail. How do
I add a check to see if j is not int("0") then append to v list? Thank you
in advance. -A

-- 
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090103/cd2f9dca/attachment.html>


More information about the Python-list mailing list