def convert_prob_list_to_1h(lst):
    """
    Convert list of probabilities or score values into one-hot encoding list,
    where element with highest prob./score gets 1, others 0.

    >>> lst = [0.3, 0.5, 0.2, 0.1, 0.1]
    >>> convert_prob_list_to_1h(lst)
    [0, 1, 0, 0, 0]

    """
    assert lst, "given lst empty"
    new_lst = [0]*len(lst)
    max_i = 0
    max_e = 0
    for i,e in enumerate(lst):
        if e > max_e:
            max_e = e
            max_i = i
    new_lst[max_i] = 1
    return new_lst