Python Decorators

Let's start with something simple..What is a decorator? According to, "A decorator is the name used for a software design pattern. Decorators dynamically alter the functionality of a function, method, or class without having to directly use subclasses or change the source code of the function being decorated" A classic example tat I can … Continue reading Python Decorators

Mystery with remove and pop in Python lists

Thanks Vishal for his inputs on this.. According to python docs list.remove(x)Remove the first item from the list whose value is x. It is an error if there is no such item.list.pop([i])Remove the item at the given position in the list, and return it. If no index is specified, a.pop() removes and returns the last … Continue reading Mystery with remove and pop in Python lists