0

Example

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

15th May 2019, 9:29 AM
Stefan Bartl
Stefan Bartl - avatar
2 Answers
+ 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)
15th May 2019, 9:48 AM
Lothar [currently less active]
Lothar [currently less active] - avatar
0
thank you !
15th May 2019, 10:29 AM
Stefan Bartl
Stefan Bartl - avatar