Skip to content

Instantly share code, notes, and snippets.

@justinas
Created November 3, 2012 12:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinas/4007320 to your computer and use it in GitHub Desktop.
Save justinas/4007320 to your computer and use it in GitHub Desktop.
justinas@ubuntu[~] python
Python 2.7.3 (default, Sep 26 2012, 21:53:58)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> s = "sėdėkužukėdės"
>>> s == s[::-1]
False
>>> s
's\xc4\x97d\xc4\x97ku\xc5\xbeuk\xc4\x97d\xc4\x97s'
>>> s = u"sėdėkužukėdės"
>>> s == s[::-1]
True
justinas@ubuntu[~] python3
Python 3.2.3 (default, Sep 30 2012, 16:43:30)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> s = "sėdėkužukėdės"
>>> s == s[::-1]
True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment