def pov_index(expenditure, poverty_line, *args):
    """
        Poverty gap index: adds up the extent to which individuals on average fall below the poverty line.
        It is expressed as a percentage of the poverty line.
        
        First argument is a list having numerical values of individual's or country's expenditure
        Second argument refers to the minimum income for not being considered as poor.
        
        If just two arguments are passed in pov_index it will calculate the pov_index considering the entire list.
        If *args=0 => entire list will be considered
        If *args=1 => Just the poor population will be considered
    """
    index = 0
    count = 0
    for country in expenditure:
        if country < poverty_line:
            index += (poverty_line - country) / poverty_line
            count += 1
    if len(expenditure) != 0 and (len(args) == 0 or args[0] == 0):
        return index / len(expenditure)
    elif len(expenditure) != 0 and args[0] == 1 and count != 0:
        return index / count
    else:
        print('Check Parameters.')
        return
