![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to use continue statement in Python loop?
The loop control statement continue abandons the pending statements in current iteration of the looping block and starts next iteration. The continue statement appears in a conditional block inside loop
Example
x=0 while x<10: x=x+1 if x==5: continue print ('x=',x)
The output shows that when x is 5 the print statement is not executed and next iteration is undertaken printing from x=6 onwards
Output
x= 1 x= 2 x= 3 x= 4 x= 6 x= 7 x= 8 x= 9 x= 10
Advertisements