❮ Previous Next ❯

Python break & continue Statement


Python break Statement

Basically break statement is considered as transfer statement. When the break statement executes based on a condition inside a loop, then the loop is terminated.
python break
Let’s see the following example; here loop is terminating when x==”PHP”
break example output: break output

Python continue Statement

Like break statement, the continue statement is another transfer statement. When the continue statement executes based on a condition inside a loop, then some portion of the loop is skipped.
Using continue statement we can stop the current iteration of the loop, and continue with the next:
python continue
Let’s see an example;

course=["Java","Oracle","PHP","Android","Python"]

for x in course:

    if(x=="PHP"):

      continue

print(x)

output: continue output


❮ Previous Next ❯

Follow Us




  Tutorials

Popular Links

Contact Us

address Plot No-741,2ND Floor
Opp. Bhagabati Temple,Jayadev Vihar
      Bhubaneswar-751013
      Email: info@silantechnology.com
      Phone: 0674-2361252
address
39877, sundale dr, apt#101, Fremont, California 94538, USA
       Phone: +1(262)388-7619

facebook twitter google linked in

© 2018 Silan Technology. All Rights Reserved