while loop | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

while loop

how to use while loop using string

8th Aug 2018, 9:29 AM
chachajane
1 Answer
0
n = raw_input("Please enter 'hello':") while n.strip() != 'hello': n = raw_input("Please enter 'hello':") this is an example of what you asked...
8th Aug 2018, 10:16 AM
Alireza SaeidianRad