"""
lec7
"""

i = 5

#while i >=0 :
#    print(i)
#    i = i-1           --> if you put this first it will start with 4 and go till -1
                     # --> if you dont have a false statement it will be a deadloop bc it wont end


#while i >= 0 :
#    i = i - 1

#    if i ==3:
#        break
#    print(i)        --> result is 4


#for word in 'hello world'.split():
#    print(word)
    
#    for str_item in word:
        
#        if str_item =='l':
#            break                --> once you come across letter l it will stop the current while loop
#        print(str_item)      
    
    
#while i >=0 :
#    i = i - 1
    
#    if i ==3:
#        pass                     --> pass does nothing but is used if syntax requires
#        continue                 --> skips number 3 but continues running after
#    print(i)
    
#try:
#    print(1/0)
#except:                          --> code will still be excecuted successfully
#    print('error')


#while i >=0 :
#    try:
#        print(1/(i-3))
#    except:
#        pass                    --> pass is best option to finish loop compared to break and continue
# print