Last active
August 8, 2021 21:14
-
-
Save Akash671/52696bfa945ae657911a43418be99319 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def saveIronman (s) : | |
#Complete the function | |
#s = input("Enter a string: ") | |
only_alpha= "" | |
for char in s: | |
if char.isalpha() or char.isdigit(): | |
only_alpha += char | |
S=only_alpha.lower() | |
if(S==S[::-1]): | |
# print("YES") | |
return True | |
else: | |
# print("NO") | |
return False | |
#{ | |
# Driver Code Starts | |
#Initial Template for Python 3 | |
for _ in range(0,int(input())): | |
s = input() | |
ans = saveIronman(s) | |
if(ans == True): | |
print("YES") | |
else: | |
print("NO") | |
# } Driver Code Ends |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment