Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lst = input().split(' ')
- palindrome = input()
- lst = [x for x in lst if x == x[::-1]]
- number = len([x for x in lst if x == palindrome])
- print(f'{lst}\nFound palindrome {number} times')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement