LeetCode 筆記 - 9. Palindrome Number Posted on 2022-08-04 Edited on 2023-06-01題目在此 9. Palindrome Number請判斷輸入的數字是否為迴文解題思維簡單數字轉字串之後,比對反過來的版本即可程式碼123class Solution: def isPalindrome(self, x: int) -> bool: return str(x) == str(x)[::-1]