For our first assignment in Learning Machines, Patrick asked us to implement run-length encoding in Python.

Below is my code, which includes encode and decode functions.