diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2024-09-30 16:08:27 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2024-09-30 16:08:27 +0530 |
commit | 3496b0ed08c51e37e135e686b1632fd86f930c2c (patch) | |
tree | 1da44792489607070f3b4ca14d82af05b73e362b /problems/findpalindromes.py |
(init): Initialize repository.
Diffstat (limited to 'problems/findpalindromes.py')
-rw-r--r-- | problems/findpalindromes.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/problems/findpalindromes.py b/problems/findpalindromes.py new file mode 100644 index 0000000..4a0438e --- /dev/null +++ b/problems/findpalindromes.py @@ -0,0 +1,12 @@ +def check_palindrome(s): + if s == s[::-1]: + return "Strong Palindrome" + elif s.lower() == s.lower()[::-1]: + return "Weak Palindrome" + else: + return "Not a Palindrome" + +n = int(input().strip()) +for _ in range(n): + s = input().strip() + print(check_palindrome(s)) |