Answers for "how to break an if statement python"

0

how to break an if statement python

number = 0
for number in range(10):
    if number == 5:
        break    # break here
    print('Number is ' + str(number))
print('Out of loop')
Posted by: Guest on March-22-2021

Code answers related to "how to break an if statement python"

Python Answers by Framework

Browse Popular Code Answers by Language