def menu(texte, data):
    """
    input texte, returns the answer if it is an int within data indexes.
    """
    j = 1
    while j:
        choice = input(texte)
        try:
            data[int(choice)]
            return choice
        except:
            print("\nMerci de taper un chiffre parmis les choix proposés\n\n")