updated contents from Atlas repo

This commit is contained in:
Luciano Ramalho
2014-10-14 14:26:55 -03:00
parent 40688c038d
commit 981d5bc473
157 changed files with 71134 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
from pyuca import Collator
def check(sorted_list):
return 'CORRECT' if fruits == sorted_list else 'WRONG'
fruits = ['açaí', 'acerola', 'atemoia', 'cajá', 'caju']
print('manual_sort', fruits)
plain_sort = sorted(fruits)
print('plain_sort ', plain_sort, check(plain_sort))
coll = Collator()
pyuca_sort = sorted(fruits, key=coll.sort_key)
print('pyuca_sort ', pyuca_sort, check(pyuca_sort))