Thursday, January 24, 2013

Readability counts.

Now idea of this post is to simply give the idea that there are more than one ways of doing same thing in python but the final call is yours!
For example, I recently notice some argument regarding the correctness of the following expression in python:

if not x in alist OR if x not in alist

Now, both produces the same result. I personally favor the second one as its easy to understand for anyone. I let you decide you choices :)