Advertisement
viligen

palindrome

Oct 10th, 2021
1,120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. def palindrome(any_list):
  2.     boolean_list = []
  3.     for element in any_list:
  4.  
  5.         if element[::-1] == element:
  6.             boolean_list.append(True)
  7.         else:
  8.             boolean_list.append(False)
  9.     return boolean_list
  10.  
  11.  
  12. list_numbers = input().split(", ")
  13.  
  14. print(*palindrome(list_numbers), sep="\n")
  15.  
  16.  
  17.  
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement