The Stack Data Structure in Python

The stack is a wonderfully simple data structure which despite its simplicity makes many powerful algorithms possible. Some of the uses for a stack data structure in software development are: The Depth-First...

Python Programming – List Mutation

A Surprising Feature of Python Lists What do you expect the output of the following Python code to be? def mutate_or_not(a_list): a_list[0] = "I've changed" my_list = [1, 2, 3] mutate_or_not(my_list) print(my_list)...

Python Memoization

Improving the efficiency of Python Programs Using Memoization Some of you may be familiar with the Fibonacci sequence, which is famous in both mathematics and computer programming. The sequence is formed by...

2-Dimensional Lists in Python

2-dimensional lists are an extremely important data structure in Python programming, with many applications. They can be very confusing to begin with, and you should make sure you are confident and competent...