Maszi

#feriechallenge HardCoder 1/10 :)

Jan 4th, 2021
444
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import re
  2. import webbrowser
  3.  
  4. def ispalindrom(text):
  5.     text = text.lower().replace(" ", "")
  6.     text = re.sub('[^a-zA-Z łęóąśżźćń]+', '', text)
  7.     print(text[::-1])
  8.     if (text == text[::-1]):
  9.         query = 'https://poocoo.pl/scrabble-slowa-z-liter/' + text
  10.         webbrowser.open(query)
  11.         return "Podany napis jest palindoromem"
  12.     else:
  13.         return "Podany napis nie jest palindoromem"
  14.  
  15. text = input("Wprowadź napis: ")
  16. print(ispalindrom(text))
  17.  
RAW Paste Data