how do I break out of a While True loop in python3
It is worth noting that a non-null entry evaluates to True, so it is common to have a loop that prompts a user to enter something or just return to exit:
while True:
answer = input("Enter a phrase (enter alone to exit): ")
if not answer:
break
print(f'You entered {answer}.')
print('All done.')