Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You create a list, so this expression won't shortcut like or. Or is definitely the right way to write an expression like this. Any has its place, but mostly when it's input is a generator, e.g.,

    any(k in obj for k in other)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: