def select(lstbox, multiple):
    """Returns the user's selection a Listbox

    Keyword arguments:
    lstbox -- Tkinter Listbox Widget
    multiple -- indicates whether to return a string or a list"""
    reslist = list()
    selection = lstbox.curselection()
    for i in selection:
        entrada = lstbox.get(i)
        reslist.append(entrada)
    if (multiple == 1):
        return reslist
    else:
        return reslist[0]