Articles → PYTHON → Break and continue statement in python

Break and continue statement in python






Break statement






message = "This is the test message"

for character in message:
  if character == " ":
  break
else :
  print("The value is ", character)











Click to Enlarge




Continue statement




message = "This is the test message"

for character in message:
  if character == " ":
  continue
else :
  print("The value is ", character)





Click to Enlarge




Posted By  -  Karan Gupta
 
Posted On  -  Monday, February 18, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250