Perfect Square In Python