How to Write Squared in Python