This program asks users to rank an item and validates the rank
Your getRank function could use a little flexibility. If the user inputs low, their input is rejected as incorrect. To solve this you can take the first character of the string passed. Since you index the string at 0, input like l will still work.
Your validation loop could also use some work. Since you're only checking if the users choice is in the valid input list, make the while loop represent that!
def getRank(choice: str) -&gt; str:
    choices = ['l', 'm', 'h']
    choice = choice.lower()[0]
    while choice not in choices:
        print(f'Only enter a valid choice ({choices})')
        choice = input('Please enter a rank: ').lower()[0]
    return choice