Fixed subproblems 0 and 1 to work with Python lists