While + input() | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

While + input()

How can I save the input ( ) the user gives when it's in a while circle ? ex : while input( ) != ('Stop') : etc... Thanks :)

10th Mar 2017, 6:57 PM
Sergdum
1 Answer
+ 1
print("Please is you need to quit, type 'Stop'") answer = input("Tell me your name? ") while answer != 'Stop': '''do something with the answer''' print("Hello " + answer) answer = input("Tell me another name? ") print("Ending program")
10th Mar 2017, 10:59 PM
Arturo Santos Pardo
Arturo Santos Pardo - avatar