Advertisement
kananmahammadli

Untitled

Aug 18th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. from random import*
  2.  
  3. ls=[randint(0,100) for _ in range(10)]
  4. print(*ls)
  5.  
  6. def pal(ls):
  7.     copy = ls[:]
  8.     for i in range(len(copy)//2):
  9.         copy[i],copy[len(copy)-1-i]=copy[len(copy)-1-i],copy[i]
  10.     if ls==copy:
  11.         return True
  12.     return False
  13.  
  14. if pal(ls):
  15.     print("polindromdur")
  16. else:
  17.     print("polindrom deyil")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement