Python continue

Python Programming Training Certification

Flexible Hours

100 Assignments

Instructor Led online Training

50 LMS Access

24X7 Support

100% Skill Level

Enquire Now

4.9 out of 1000+ Ratings
Best Python Institute for Learning Python Course & Training, Live Project Training in Python with Django, Data Science and AI, Interview Assistance, Expert Coaching Trainers. Python Certification & Interview Assistance! Get free demo now!

Course Overview

Python is one of the world’s top programming languages used today and Python training has become the most popular training across individuals. Training Basket’s Python Training & Certification course covers basic and advanced Python concepts and how to apply them in real-world applications.Python is a flexible and powerful open-source language that is easy to learn and consists of powerful libraries for data analysis and manipulation. Our Python training course content is curated by experts as per the standard Industry curriculum. The curriculum, coding challenges and real-life problems cover data operations in Python, strings, conditional statements, error handling, shell scripting, web scraping and the commonly used Python web framework Django. Take this Python training and certification course and become job-ready now.

Python continue Statement

TThe continue statement in Python is used to bring the program control to the beginning of the loop. The continue statement skips the remaining lines of code inside the loop and start with the next iteration. It is mainly used for a particular condition inside the loop so that we can skip some specific code for a particular condition.The continue statement in Python is used to bring the program control to the beginning of the loop. The continue statement skips the remaining lines of code inside the loop and start with the next iteration. It is mainly used for a particular condition inside the loop so that we can skip some specific code for a particular condition.

Syntax

  • #loop statements
    continue
    #the code to be skipped

Flow Diagram

Example 1

  • i = 0
    while(i < 10):
    i = i+1
    if(i == 5):
    continue
    print(i)

Output:

  • 1
    2
    3
    4
    6
    7
    8
    9
    10

Observe the output of above code, the value 5 is skipped because we have provided the if condition using with continue statement in while loop. When it matched with the given condition then control transferred to the beginning of the while loop and it skipped the value 5 from the code.

Let’s have a look at another example:

Example 2

  • str = “JavaTpoint”
    for i in str:
    if(i == ‘T’):
    continue
    print(i)

Output:

  • J
    a
    v
    a
    p
    o
    i
    n
    t

Pass Statement

The pass statement is a null operation since nothing happens when it is executed. It is used in the cases where a statement is syntactically needed but we don’t want to use any executable statement at its place.

For example, it can be used while overriding a parent class method in the subclass but don’t want to give its specific implementation in the subclass.

Pass is also used where the code will be written somewhere but not yet written in the program file. Consider the following example.

Example

  • list = [1,2,3,4,5]
    flag = 0
    for i in list:
    print(“Current element:”,i,end=” “);
    if i==3:
    pass
    print(“\nWe are inside pass block\n”);
    flag = 1
    if flag==1:
    print(“\nCame out of pass\n”);
    flag=0

Output:

  • Current element: 1 Current element: 2 Current element: 3
    We are inside pass block

    Came out of pass

    Current element: 4 Current element: 5

We will learn more about the pass statement in the next tutorial.

Recently Trained Students

Jessica Biel

– Infosys

My instructor had sound Knowledge and used to puts a lot of effort that made the course as simple and easy as possible. I was aiming for with the help of the ZebLearn Online training imparted to me by this organization.

Richard Harris

– ITC

I got my training from Zeblearn in the Python Certification Training, I would like to say that say he is one of the best trainers. He has not even trained me but also motivated me to explore more and the way he executed the project, in the end, was mind-blowing.


Candidate’s Journey During Our Training Program

Card image cap

Expert’s Advice & Selection of Module

Choosing the right type of module for the training is half the battle & Our Team of experts will help & guide you.

Card image cap

Get Trained

Get Trained & Learn End to End Implementation from our Expert Trainer who are working on the same domain.

Card image cap

Work on Projects

We Do make our student’s work on multiple case studies , scenario based tasks & projects in order to provide real-time exposure to them.

Card image cap

Placements

We have a dedicated placement cell in order to provide placement assistance & relevant interviews to our candididates till selection

Placement Partner

×

Leave your details

×

Download Course Content