Matt D wrote:
> In your comprehension example, I'm fairly certain the filtering should be on 
> the post incremented remainder
> [ x+1 for x in [1,2,3] if (x+1) % 2 == 0]

how about
[ sum for num in [1,2,3] if ((sum := num + 1) %2 == 0]
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/QHNJHTU5HRNLVGH7M27G5DZJACYR7GYZ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to