Python implementation of conways game of life