Determine whether an integer is a "palindrome". An integer is a palindrome when it reads the same backward as forward.
a integer num
-30000<=num<=30000
True or False
121
True
-121
True
1345
False
You can simply read the input() as string (no "integer conversion" is needed this time) and then verify the digit (from both directions, left and right). Note that you may need to handle the "negative" symbol by yourself.
>> thislist = ["apple", "banana", "cherry"]
>> print(thislist[::-1])
ID | User | Problem | Subject | Hit | Post Date |
沒有發現任何「解題報告」 |