CSC108 T0701 Ki-Z

Let me know how my teaching is!

week of october 6

matrix addition

Write a function that takes in a list containing two sublists with an equal number of items and returns a new list with the elements of the sublist interleaved. For example, given the list [["a", "b", "c"], [1, 2, 3]], return the new list ["a", 1, "b", 2, "c", 3]. The function should have the following signature:
def interleave_list(inputList):
You can test your function using the following:
if interleave_list([["a", "b", "c"], [1, 2, 3]]) != ["a", 1, "b", 2, "c", 3]:
   print "Test failed"
Try writing some of your own tests.