Created
August 24, 2026 20:57
-
-
Save orjanv/4ac570db226ddac2bb3584ed56c16dc6 to your computer and use it in GitHub Desktop.
Perfect square palindromes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NUM = 1000000 | |
| psp = [] | |
| for n in range(1, NUM): | |
| square = str(n**2) | |
| if square == square[::-1]: | |
| psp.append(int(square)) | |
| print(psp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment