Python continue Statement

Rumman Ansari   Software Engineer   2021-01-11 00:00:00   5390 Share
Subject Syllabus DetailsSubject Details
☰ Table of Contents

Table of Content:


With the continue statement we can stop the current iteration of the loop, and continue with the next:

Example

Do not print atnyla:

Code:


name = ["python", "atnyla", "code"]
for x in name:
  if x == "atnyla":
    continue
  print(x) 

Output:

 
 python 
 code