• + 1 comment

    len([0,1,2,3,4) == 5

    so list[len(list)] is out bounds because the index starts at 0.

    for i in range(len(b)-1):