Last weekend, out of curiosity, I was set to explore how strings are implemented in CPython. The results were overwhelming. I realized that how little I knew about different string concepts and optimizations in Python.
What’s more fascinating is that a lot of programmers are unaware of these concepts. With these insights, I have an opportunity to baffle a few Python programmers out there.
Okay, I’ll begin with a simple snippet that I ran in my IPython interpreter,
>>> a = "wtf" >>> b =...