while-else.py
count=0
while count<5:
if count ==1:
break
print(count)
count+=1
else:
print('breakで抜けた場合は実行されない')
More than 3 years have passed since last update.
count=0
while count<5:
if count ==1:
break
print(count)
count+=1
else:
print('breakで抜けた場合は実行されない')
Register as a new user and use Qiita more conveniently