/
rnekrasov
/
Python
Обзор
Документация
Войти
/
rnekrasov
/
Python
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Palindrome_Checker.py
12 строк
411 B
slowy07
refactor: clean code
30 янв 2022, 04:33
30 янв 2022, 04:33
f0af0c4
Код
Авторство
О чём код?
""" A simple method is , to reverse the string and and compare with original string. If both are same that's means string is palindrome otherwise else. """ phrase = input() if phrase == phrase[::-1]: # slicing technique """phrase[::-1] this code is for reverse a string very smartly""" print("\n Wow!, The phrase is a Palindrome!") else: print("\n Sorry, The given phrase is not a Palindrome.")