+ 11

Do anyone print a palindrome in list using a.reverse() function??

22nd May 2019, 4:12 AM
SωAti
SωAti - avatar
4 ответов
+ 1
x = ["a", "n", "n", "a"] y = x[:] x.reverse() print("Is palindrome?", x==y)
22nd May 2019, 4:18 AM
Diego
Diego - avatar
+ 6
Diego your answer is not correct.
22nd May 2019, 6:30 AM
SωAti
SωAti - avatar
+ 6
Hum correct
22nd May 2019, 6:39 AM
SωAti
SωAti - avatar
0
Swati Nanda Gupta What about now?
22nd May 2019, 6:34 AM
Diego
Diego - avatar