Use of break statement In python

# Write a program to use of break statement 

no = 0
for no in range(10):
   no = no + 1
   if no == 7:
      break    # Here  break  statement stop next iteration
   print("Number is:" + str(no))


Output:



Popular posts from this blog

Python Programming Practical no 1

Python Progrmming Practical No 3