-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathuse_of_break.py
25 lines (23 loc) · 926 Bytes
/
use_of_break.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
#####
#THIS IS FOR MY OWN REFERENCE. THIS HAS NOT MUCH TO DO WITH THE MEAN SHIFT CLUSTERING ALGORITHM THAT I HAVE IMPLEMENTED.
#####
#the following logic has been used in the filtering of the cluster centers lying very clode to each other.
#this is used a rough idea of how we can use break intelligently to check for a condition and if the condition satisfies, we can start over the while loop.
#we will only get out of the while loop when the condition doesnt satisfy even once.
while True:
brk = False
for i in range(5):
#for j in range(5):
for k in range(5):
print(i,k)
if (i,k) == (3,1):
#a=False
brk = True
break #breaks out of the current for loop
if brk == True:
break
print('here')
print('-------')
print('good')
if not brk:
break