Writing a while loop with ++x to increment the index was the first mistake i made with python. "++x" unfortunately is valid, it's not a single operator but a double "unary plus" Andrea