there are people sitting in a circular fashion print every third member while removing them the next counter starts immediately after the member is removed print till all the members are exhausted for example input consider 123456789 members sitting in a circular fashion output 369485271 list starts with 0 index hash index to every 3rd
def josephus(int_list, skip):
    skip = skip - 1                     
    idx = 0
    len_list = (len(int_list))
    while len_list > 0:
        idx = (skip + idx) % len_list   
        yield int_list.pop(idx)
        len_list -= 1