Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- def pal(x):
- x2 = x[::-1]
- if x == x2 :
- return ('yes')
- else:
- return ('no')
- count = 0
- for i in range(3):
- b = pal(input())
- if b == 'yes':
- count += 1
- if count > 0:
- print("в списке есть палиндром")
- else:
- print("в списке нет палиндромов")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement