Example | Sololearn: Learn to code for FREE!

0

Example

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

+3

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)

0

thank you !