Exercism squares in Python