def median(lst):
    """ calculate the median in a list of data
    Args:
        lst (list): list of numeric data
    Returns:
        median (int)
    """
    lst.sort()
    length = len(lst)
    if length % 2 == 0:
        median = 0.5 * (lst[length//2-1] + lst[length//2])
    else:
        median = lst[length//2-1]
    return median