how to use break in python and continue code example
Example 1: continue statement python
import numpy as np
values=np.arange(0,10)
for value in values:
if value==3:
continue
elif value==8:
print('Eight value')
elif value==9:
break
Example 2: python break
nums = [6,8,0,5,3]
product = 1
for num in nums:
if num == 0:
product = 0
break # stops the for loop
product *= num
print(product)