差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン最新のリビジョン両方とも次のリビジョン | ||
python:for_range_enumerate [2016/01/22 16:15] – ともやん | python:for_range_enumerate [2019/07/27 04:53] – ともやん | ||
---|---|---|---|
行 1: | 行 1: | ||
+ | <ifauth !@loggedinusers>< | ||
+ | <script async src="// | ||
+ | < | ||
+ | | ||
+ | google_ad_client: | ||
+ | enable_page_level_ads: | ||
+ | }); | ||
+ | </ | ||
====== for range enumerate 文 ====== | ====== for range enumerate 文 ====== | ||
行 29: | 行 37: | ||
color4: white | color4: white | ||
</ | </ | ||
+ | |||
+ | ===== continue と break ===== | ||
+ | 一定の条件で処理をスキップ | ||
+ | <code python> | ||
+ | for index in range(10): | ||
+ | if index >= 2 and index <= 7: | ||
+ | continue | ||
+ | print(' | ||
+ | |||
+ | index: 0 | ||
+ | index: 1 | ||
+ | index: 8 | ||
+ | index: 9 | ||
+ | </ | ||
+ | 一定の条件で処理を中止 | ||
+ | <code python> | ||
+ | for index in range(10): | ||
+ | if index >= 4: | ||
+ | break | ||
+ | print(' | ||
+ | |||
+ | index: 0 | ||
+ | index: 1 | ||
+ | index: 2 | ||
+ | index: 3 | ||
+ | </ | ||
+ |