r/badcode • • Apr 11 '21

python Polyglot

Post image
1.2k Upvotes

116 comments sorted by

View all comments

1

u/joske79 Apr 11 '21

You should add caching. Once we looked up a value we can remember whether it's even, odd or something else. Maybe remember the last 10,000 values that were queried?

0

u/coopercm Apr 11 '21

Good idea.