[Tutor] easiest way to get true/false of odd/even number

shawn bright nephish at gmail.com
Mon May 14 20:48:00 CEST 2007


nevermind, i found it.

4 %2 = 0  (even)
5 %2 = 1 (odd)

pretty simple

shawn

On 5/14/07, shawn bright <nephish at gmail.com> wrote:
>
> Hey there all,
> i know this sounds kinda easy, but i was wanting the least verbose way to
> get a True / False of a number being odd (not even)
> thanks
> shawn
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070514/8a181e8c/attachment.htm 


More information about the Tutor mailing list