For loop with else:
khana =['roti','rolljack','sabji']
# for ke sath else taab use karte hai jaab apko uska item nahi mile
for item in khana:
if item == 'roti':
print("Item is exists")
break
else:
print("Item not exists")For loop with else:
khana =['roti','rolljack','sabji']
# for ke sath else taab use karte hai jaab apko uska item nahi mile
for item in khana:
if item == 'roti':
print("Item is exists")
break
else:
print("Item not exists")0Comments
Thanks you for commenting your questions. I will see question and respond you.