Permalink
Browse files

sort function

  • Loading branch information...
libscott committed Dec 4, 2012
1 parent 6937322 commit a8893fd034d2411b48ed2094656b35e4e77009ad
Showing with 5 additions and 4 deletions.
  1. +5 −4 roman.py
View
@@ -6,10 +6,6 @@ def rank(roman_char):
return CHARS.index(roman_char)
-def normalize_roman_char():
- pass
-
-
def prep_numeral(numeral):
out = []
n = 0
@@ -29,3 +25,8 @@ def prep_numeral(numeral):
out.append(numeral[n])
n += 1
return out
+
+
+
+def sort_numeral(numeral):
+ return sorted(numeral, key=rank, reverse=True)

0 comments on commit a8893fd

Please sign in to comment.