Skip to content

Instantly share code, notes, and snippets.

@faretek1
Created February 17, 2026 12:19
Show Gist options
  • Select an option

  • Save faretek1/8e71f6b36fbd7cea6845db9624407f0e to your computer and use it in GitHub Desktop.

Select an option

Save faretek1/8e71f6b36fbd7cea6845db9624407f0e to your computer and use it in GitHub Desktop.
check if smth is a palindrome. 1-liner-ified. i do not recommend using this code.
s = input(">")
print(all(a == b for a, b in zip(s, s[::-1])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment