The loop-else pattern is perfect for searching:
target = "Python"
for language in languages:
if language == target:
print("Found it!")
break
else:
print("Not found")
Without the else clause, you'd need a flag variable:
found = False
for language in languages:
if language == target:
print("Found it!")
found = True
break
if not found:
print("Not found")
The else version is cleaner. It's not common in other languages, but Python developers appreciate it once they learn it.