def mean(mylist):
    """
    Calculates the arithmetic average of mylist
    :param mylist: The list to take the average over
    :return: Arithmetic average of mylist
    """

    # List is empty
    if len(mylist) == 0:
        return 0
    else:
        return sum(mylist) / len(mylist)