Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- v = 'POLYGN'
- k = 0
- for a1 in v:
- for a2 in v:
- for a3 in 'OY':
- for a4 in v:
- for a5 in v:
- s = a1 + a2 + a3 + a4 + a5
- if s != s[::-1]:
- continue
- k += 1
- print(s)
- print(k)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement