Find some of my best answers on Stack Overflow
If you find them interesting please send me a mail.
str.translate
in Python 3.4 and then again in Python 3.5 the speed difference in the case of ascii strings is remarkable. It is because of a change in the underlying C code. To know More,
Read More!
str
on any function usually calls the __str__
function of the passed argument. However for a list there is no __str__
method! What happens in this case then? To know More,
Read More!
a,b = b,a
. But is this same as b,a = a,b
? No! Not in every case. The swapping too has an order that it follows. To know More,
Read More!
min
and the max
function both use comparision operators to find the correct return value. But how does it decide when the lists are heterogeneous or when the list elements are strings. To know More,
Read More!
map(strip,l)
directly? To know More,
Read More!