-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontinue_breake_pass.py
More file actions
31 lines (26 loc) · 978 Bytes
/
Copy pathcontinue_breake_pass.py
File metadata and controls
31 lines (26 loc) · 978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
""" Continue Statement:
Continue is used to stop the current iteration of the loop and continue with the next one. It instructs the program to "skip this iteration" ..
"""
# write a program using continue statements ..
for i in range (0,4):
if i == 2:
continue
print(i)
""" Breake statements:
Breake is used to come out of the loop when encountered. It instructs the program to exist the loop now ..
"""
# write a program using breake statements ..
for i in range(0,80):
if i == 3:
break
print(i)
""" Pass Statements:
Pass is a null statements in python in instruct to "do nothing" ..
"""
# write a program using pass statements ..
l = [1,7,8]
for item in l:
pass # ye likhne se hoga kya ki agr ye code hme yaha tak bhi chor ke apna dusra code ko age bada skte h.
# without any error ke ..
# ye code loop se bahr h ..
print("Code will ending ..")