Hacker News new | past | comments | ask | show | jobs | submit login

Bad example? x % 10 does not return a bool.



Whoops!

For future internet historians, it should have been:

    sum(x % 10 == 0 for x in range(1000))




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

Search: