Optimizing the any function in python | Dark Hacker News