Think you know Python? Try these:
π§© Curiosities inside:
β’ ~True β -2 β and how that helps with reverse indexing
β’ all([]) is True β but why?
β’ bool as int: "Python"[True] β 'y'
β’ Range slicing + set union = one-liner Project Euler
β’ Multiply lists the right way (or end up with shared memory)
β’ Fibonacci without numbers
π‘ These arenβt gimmicks β they sharpen your mental model.
π Try the full set of micro-insights:
https://medium.com/pythoneers/hidden-sides-of-python-2025-practical-curiosities-for-the-inquisitive-coder-ecaff074c43c
Top comments (0)