Cellular Automats in python