Python continue statement
Translation results:
Python continue statement jumps out of this loop, while break jumps out of the entire loop.
The continue statement is used to tell Python to skip the remaining statements of the current loop and continue with the next cycle.
The continue statement is used in while and for loops.
Python continue statementsyntax
Python continue statement jumps out of this loop, while break jumps out of the entire loop.
The continue statement is used to tell Python to skip the remaining statements of the current loop and continue with the next cycle.
The continue statement is used in while and for loops.
Python continue statementexample
#!/usr/bin/python# -*- coding: UTF-8 -*- for letter in 'Python': # first instance if letter == 'h': continue print 'Current letter:', letter var = 10 # The second instance while var > 0: var = var -1 if var == 5: continue print 'Current variable value:', varprint "Good bye!"
Popular Recommendations
- Pavel Durov Issues Statement Addressing His Arrest and Legal Concerns Over Telegram Users’ Activities
- Notcoin (NOT) Struggles Continue in the Crypto Market
- Notcoin (NOT) Price Prediction: Will the Drawdown Continue?
- Python day 00
- Python Code Snippets
- NEAR Protocol (NEAR) Price Prediction: Can the Rally Continue?