Skip to content

Latest commit

 

History

History
45 lines (36 loc) · 434 Bytes

File metadata and controls

45 lines (36 loc) · 434 Bytes
description loop
keywords python
title loop
toc_max 4

for loop

users = ["kamal","jamal","maruf","sadia"]

for name in users:
  print(name)

break

for i in range(1,10):
  if i == 5:
    break
  print(i)
# 1 2 3 4

continue

for i in range(1,10):
  if i == 5:
    continue
  print(i)
# 1 2 3 4 6 7 8 9

while

i = 0
while i <= 5:
  print(i)
  i = i + 1
# 0 1 2 3 4 5