-
Notifications
You must be signed in to change notification settings - Fork 0
/
16 for loop.py
41 lines (26 loc) · 911 Bytes
/
16 for loop.py
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
32
33
34
35
36
37
38
39
40
41
list1 = [10,5,87,4,5,14]
for x in list1:
print(x)
if x is 5 :
break
print("----------------------------------------------------------------------")
list2=["shashank",54,785]
for y in list2 :
print(y)
if y is 54 :
continue
print("------------------------------------------------------------------")
list3=[57 ,546,56,78,54]
for z in list3 :
print(z)
if z == 56 :
break
else :
print("successfully")
print("--------------------------------------------------------------------------")
# range
for a in range(2,10,2):
print(a)
print("------------------------------------------------------------")
for b in range(1,10,2):
print(b)