how to detect when word is ending at awhile loop python code example
Example 1: while loop in python for do you want to continue
while True:
# some code here
if input('Do You Want To Continue? ') != 'y':
break
Example 2: while loop in python for do you want to continue
while input("Do You Want To Continue? [y/n]") == "y":
# do something
print("doing something")