while
🌡️ Keep repeating while condition holds
Repeats as long as the condition stays true.
中文对照 · Chinese
🌡️ 只要水没烧开就继续加热
只要括号里的条件为真,就一直循环下去。
Code example
while energy > 0:
energy -= 1Explore 100 bilingual word cards →Repeats as long as the condition stays true.
🌡️ 只要水没烧开就继续加热
只要括号里的条件为真,就一直循环下去。
while energy > 0:
energy -= 1Explore 100 bilingual word cards →