TristanSld

sort method in lists 1

Jan 8th, 2014
48
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python
  2. #-*-coding:utf-8-*-
  3. import locale
  4. locale.setlocale(locale.LC_ALL,"")
  5. isimler=["Kürşat","Ökkeş","Çetin","Fırat"]
  6. print isimler, "\n"
  7. isimler.sort(key=locale.strxfrm)
  8. for i in isimler:
  9.     print i
RAW Paste Data