def get_sheet_from_input(sheets):
    """
    returns a sheet index based on user input from a list of sheet names

    :list param sheets: List of sheet names
    :return: sheet index
    :rtype: int
    """
    sheet_choice = ''
    for i, val in enumerate(sheets):
        sheet_choice = sheet_choice + str(i + 1) + '. ' + val + '\n'
    sheet_idx = int(input(sheet_choice)) - 1
    return sheet_idx
