Skip to content

Instantly share code, notes, and snippets.

@L3viathan
Created November 20, 2021 08:45
Show Gist options
  • Select an option

  • Save L3viathan/e2e191255d25b34e1f86ce054ae617e5 to your computer and use it in GitHub Desktop.

Select an option

Save L3viathan/e2e191255d25b34e1f86ce054ae617e5 to your computer and use it in GitHub Desktop.
Python palindrome detector that consists of palindromes. cat yp.py | python yp.py
exec("\n".join(l[:len(l)//2+1].strip().replace("X"," "*4)for l in"""ni l rof)4*" ","X"(ecalper.)(pirts.]1+2//)l(nel:[l(nioj."n\"(cexe
import sysys tropmi
for l in sys.stdin.readlines():)(senildaer.nidts.sys ni l rof
XL=l.rstrip("\\n");print(L==L[::-1])]1-::[L==L(tnirp;)"n\\"(pirtsr.l=LX
))]1-:1[)"n\"(tilps.""".split("\n")[1:-1]))
@sarnthil
Copy link
Copy Markdown

🤯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment