Python has a special feature called integer caching, or integer interning. Sometimes, it may make us confused. For example, if we run the following code on a Python shell, the results are surprising… (more…)
Read more »
When testing a modification to a Python program, I noticed a strange thing:some of the messages that the program should have been sending to the syslogwere m... (more…)
Read more »
Learn how to setup a Python virtual environment with conda in order to make the installation of packages and dependencies easier and more efficient. (more…)
Read more »
Let’s say that you have a binary tree and we needed to know it’s maximum depth. Binary tree input data [3,9,20,null,null,15,7] could be visualised as follows: In the above example, the depth would be 3. As there are 3 levels. How would we write some Pytho... (more…)
Read more »