0
Example
Do you have an example where it makes sense zu use a „Do..While“ ? (No checking if the code is correct)
2 Respuestas
+ 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 !