Example | Sololearn: Learn to code for FREE!



Do you have an example where it makes sense zu use a „Do..While“ ? (No checking if the code is correct)

5/15/2019 9:29:27 AM

Stefan Bartl

2 Answers

New Answer


One example would be if you want to run your programm in an infinite loop with input function inside. my_lst = [] while True: inp = input('Input number or quit with *: ') if '*' in inp: break else: my_lst.append(inp) print(my_lst)


thank you !