Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

jump
python
statements
community creator

What are jump statements in Python?

Buchiredddypalli Koushik

Types of jump statements in Python:

  • continue
  • break
  • pass
  1. Continue Statement: When the program encounters the continue statement, it will skip all the statements present after the continue statement inside the loop, and proceed with the next iterations.
for i in range(1,11):
     if i==5:
        continue
     print(i,end=" ")
  1. Break Statement: The break statement is used to terminate the loop containing it. The control of the program will come out of this loop.
for i in range(10):
    if i==4:
       break
    print(i,end=" ")
  1. Pass statement: Pass statement in Python is a null operation that is used when the statement is required syntactically.
def square_lst():
    pass

RELATED TAGS

jump
python
statements
community creator

CONTRIBUTOR

Buchiredddypalli Koushik
RELATED COURSES

View all Courses

Keep Exploring