We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c8cf8e commit c7b54a0Copy full SHA for c7b54a0
1 file changed
strings/is_palindrome.py
@@ -0,0 +1,15 @@
1
+def is_palindrome(txt):
2
+ """
3
+ Checks if a given text is a palindrome.
4
+
5
+ A palindrome is a word or phrase that reads the same forwards and backwards.
6
7
+ Parameters:
8
+ txt (str): The text to check.
9
10
+ Returns:
11
+ bool: True if the text is a palindrome, False otherwise.
12
13
+ return txt == txt[::-1]
14
15
+print(is_palindrome("radar"))
0 commit comments