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

property decorator

strings 2

Function caching