def avg(grades):
    '''
    Returns an average of a list.
    Raises an AssertionError if it is given an empty list for grades
    '''
    assert not len(grades) == 0, 'no grades data'
    return sum(grades) / len(grades)

print(avg([5, 6, 7]))
print(avg([]))
02e29c34b8c1b4bc720cf100e1aaf134b52d25c3
<mask token>

def avg(grades):
    """
    Returns an average of a list.
    Raises an AssertionError if it is given an empty list for grades
    """
    assert not len(grades) == 0, 'no grades data'
    return sum(grades) / len(grades)


<mask token>

def avg(grades):
    """
    Returns an average of a list.
    Raises an AssertionError if it is given an empty list for grades
    """
    assert not len(grades) == 0, 'no grades data'
    return sum(grades) / len(grades)


print(avg([5, 6, 7]))
print(avg([]))

def avg(grades):
    '''
    Returns an average of a list.
    Raises an AssertionError if it is given an empty list for grades
    '''
    assert not len(grades) == 0, 'no grades data'
    return sum(grades) / len(grades)

print(avg([5, 6, 7]))
print(avg([]))