Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cards › AWS

AWS Cloud

for vs while

This comparison card contrasts for and while. for is described as over a known list. while is described as until a test fails. The card pairs for with batch over items, and while with wait for a condition.

for vs while: Over a known list.; Until a test fails.
for vs while · Download PNG
Read card text

What this card says

Loop

for

Over a known list.

while

Until a test fails.

Key points

Files, ranges, arrays.

Lines, retries, polling.

Example

for f in *.log

Use when

Batch over items.

Wait for a condition.

See all AWS revision cards