Q:

Sorting alphabet in terms of numbers

def make_gradebook():
    return []

def make_module_info(module, grade):
    module_info = (module,grade)
    return module_info

def get_module(module_info):
    return module_info[0]

def get_grade(module_info):
    return module_info[1]

def get_level(module_info):
    for i in module_info[0]:
        if str.isdigit(i):
            return i

def add_grade(gradebook, module_grade):
    gradebook.append(module_grade)
    return gradebook

def sort_by_module(gradebook):
    gradebook.sort(key=lambda gradeb: gradeb[0])
    return gradebook

def sort_by_level(gradebook):
    gradebook.sort(key=lambda gradeb: get_level(gradeb))
    return gradebook

def grade_to_numeric_marks(grade):
    for i in grade:
        if i[0] == 'A':
            if i[1] == '+':
                return 90
            elif i[1] == '-':
                return 80
            else:
                return 75
        elif i[0] == 'B':
            if i[1] == '+':
                return 70
            elif i[1] == '-':
                return 65
            else:
                return 60
        else:
            if i[1] == '+':
                return 55
            elif i[1] == '-':
                return 50
            else:
                return 46
    return grade.sort()

def sort_by_grade(gradebook):
    gradebook.sort(key=lambda gradeb: grade_to_numeric_marks(gradeb))
    return gradebook

### for testing ###
gb      = make_gradebook()
cs1010s = make_module_info('CS1010S', 'A+')
cs2020  = make_module_info('CS2020', 'A')
ma1101r = make_module_info('MA1101R', 'C')
ssa1207 = make_module_info('SSA1207', 'B+')
cs4247  = make_module_info('CS4247', 'A+')
ea5001  = make_module_info('EA5001', 'B')

add_grade(gb, cs1010s)
add_grade(gb, cs2020)
add_grade(gb, ma1101r)
add_grade(gb, ssa1207)

sort_by_grade(gradebook): return a new copy of the gradebook that is sorted by module grade from high to low. Make sure that 'A+' comes before 'A'
I used grade_to_numeric_marks(grade): as an helper function but I am still not able to get the output I want which is [('CS1010S', 'A+'), ('CS2020', 'A'), ('SSA1207', 'B+'), ('MA1101R', 'C')] What's wrong ?

A:

What if you, instead of having multiple if/elif/else checks, define dictionaries grade->value and sign-value. Then, in the key function grade_to_numeric_marks just sum up base points per grade and points per sign (+/- or empty).
For example (you may need to tweak values per grade/sign a bit):
points = {'A': 80, 'B': 65}
signs = {'+': 10, '-': -5}

def grade_to_numeric_marks(item):
    grade = item[1]
    return points.get(grade[0], 50) + signs.get(grade[1:], 0)

def sort_by_grade(gradebook):
    return sorted(gradebook, key=lambda x: grade_to_numeric_marks(x), reverse=True)

grades = [('CS1010S', 'A+'), ('MA1101R', 'C'), ('SSA1207', 'B+'), ('CS2020', 'A')]
print sort_by_grade(grades)

prints:
[('CS1010S', 'A+'), ('CS2020', 'A'), ('SSA1207', 'B+'), ('MA1101R', 'C')]

Or, as @clutton mentioned in the comments, define just one dictionary with a mapping grade to points:
{'A+': 95, 'A': 90 ... }

Then, you can simplify the sorting:
points = {'A+': 95, 'A': 90, 'B+': 70, 'B': 65, 'C+': 55, 'C': 50}  # need to define all of the possible grades

grades = [('CS1010S', 'A+'), ('MA1101R', 'C'), ('SSA1207', 'B+'), ('CS2020', 'A')]
print sorted(grades, key=lambda x: points.get(x[1]), reverse=True) 

