A simple Turing Machine using Python