Loading

Paste #psmp3hbil

  1. >>> import locale
  2. >>> locale.getlocale()
  3. (None, None)
  4. >>> sorted(["auto", "Škoda", "kolo", "Canyon", "kapela", "J.A.R", "uzenina", "Čabajka"])
  5. ['Canyon', 'J.A.R', 'auto', 'kapela', 'kolo', 'uzenina', 'Čabajka', 'Škoda']
  6. >>> locale.setlocale(locale.LC_ALL, "cs_CZ.UTF-8")
  7. 'cs_CZ.UTF-8'
  8. >>> locale.getlocale()
  9. ('cs_CZ', 'UTF-8')
  10. >>> sorted(["auto", "Škoda", "kolo", "Canyon", "kapela", "J.A.R", "uzenina", "Čabajka"], key=locale.strxfrm)
  11. ['auto', 'Čabajka', 'Canyon', 'J.A.R', 'kapela', 'kolo', 'Škoda', 'uzenina']

Version history

Revision # Author Created at
pwttw2nlx Anonymous 29 Nov 2020, 15:27:07 UTC Diff