Quick actions

cmd+k|ctrl+k

Navigation

Languages

20230926KOPM4

Snippet info

Language

Python

Visibility

public

Author

john20023

Created

2023-09-26T08:22:06.108564Z

Updated

2023-09-26T08:23:05.773291Z



x = 1
while x < 5:
    print(x)
    x += 1
    
print("loop ended")
    
#continue while
    
x = 0
while x < 5:
    x += 1
    if x == 3:
        continue
    print(x)
    
#break while
    
x = 1
while x < 5:
    if x == 3:
        break
    print(x)
    x += 1
    
#else while
INFO