using else with for loops

 for i in ["harish","shiva","robin"]:

    if i=="harish" :
print(i)
break
else:
print("for loop completed properly")

Comments

Popular posts from this blog

strings 2

property decorator

Raise keyword in python