Optimizing the any function in python | Hacker News Reader