how to exit from a nested loop in python

2019-02-07 Thread Kaka
for i  in range(len(A.hp)):

for j in range(len(run_parameters.bits_Mod)):
 req_slots[j] = math.ceil((A.T[i])

 for g in Temp[i]["Available_ranges"][j]:
  for s in range(g[0], g[-1]):
  if (s+req_slots[j]-1) <= g[-1]:
 if (Temp[i]['cost'][j] <= (run_parameters.PSD):  -- When 
this condition is true i want to break the nested loop and start from the 
begining
   served_count +=1
   A.T[i]["First_index"]= s
   A.T[i]["Last_index"]= s+req_slots[j]-1
   A.T[i]["Status"]= 1
   A.T[i]["Selected_MOD"] = j
   break

I have this code. When the last "if" condition is satisfied, i want to break 
all the loops and start the nested loop for next i. else, the loop should 
continue.  

can anyone help me?
-- 
https://mail.python.org/mailman/listinfo/python-list


Searching for Happiness

2008-10-01 Thread kaka
Excuse me!!
Would you stop for a moment?!
O...man...Haven't you thought-one day- about yourself ?
Who has made it?
Have you seen a design which hasn't a designer ?!
Have you seen a wonderful,delicate work without a worker ?!
It's you and the whole universe!..
Who has made them all ?!!
You know who ?.. It's "ALLAH",prise be to him.
Just think for a moment.
How are you going to be after death ?!
Can you believe that this exact system of the universe and all of
these great creation will end in in nothing...just after death!
Have you thought, for a second, How to save your soul from Allah's
punishment?!
Haven't you thought about what is the right religion?!
Read ... and think deeply before you answer..
It is religion of Islam.
It is the religion that Mohammad-peace upon him- the last prophet, had
been sent by.
It is the religion that the right Bible- which is not distorted-has
preached.
Just have a look at The Bible of (Bernaba).
Don't be emstional.
Be rational and judge..
Just look..listen...compare..and then judge and say your word.
We advise you visiting :
http://www.islam-guide.com
http://www.thetruereligion.org
http://www.it-is-truth.org
http://www.beconvinced.com
http://www.plaintruth.org
http://english.islamway.com
http://www.todayislam.com
http://www.prophetmuhammed.org
http://www.islamtoday.net/english/
http://www.islamunveiled.org
http://www.islamic-knowledge.com

We willingly recive any inquries at the e-mail :

[EMAIL PROTECTED]

--
http://mail.python.org/mailman/listinfo/python-list