Surprisingly, I Don't Know Much About Integer Division!

Today I learned a new thing that forced me to reckon my understanding of Python. It is about //. It is just not a double slash or typo. It is an operator called integer division. The detail about how this operator works is mentioned in PEP 238. So I came across the Code Signal test and stuck at this question: Fig. 1. What, wait?! I thought that the result of both snippets should be the same....

January 14, 2022 · 3 min · Faruq Sandi