while 조건: 여기에 조건을 만족할 때만 수행되었으면 하는 코드 작성
i = 5 while i <= 10 print(i) i += 1 print("Done") # 출력 결과 5 6 7 8 9 10 Done
i = 5 while i < 7: print(i) print(i * 2) i += 1 print("Done") # 출력 결과 5 10 6 12 Done