It's common for command line yes-or-no prompts to have a default value, it'll be indicated by a capital letter. So in your example, 'yes' is the default option since 'Y' is capital and 'n' is not. One way the default option can be chosen is by simply hitting the enter key.

It's also common for command line yes-or-no prompts to abort on anything that's not a 'yes' answer, and assume it's a 'no' answer.

Finally, it's common for command line yes-or-no prompts to only check the first character in the response. This means 'yes' is just as valid as 'y', for example.

I recommend adding these common practices to your code. You can get rid of the loop and replace it with

    if not choice or choice[0].lower() == 'y':
        # user said yes
    # else abort (implies user said no)

but because you are returning true or false, you can also do

    return not choice or choice[0].lower() == 'y'