def IsPalidrome(str): return str == str[::-1] sample = "now"print(IsPalidrome(sample))
Standard input is empty
False
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!