python pattern drawing