Functions can have multiple return statements:
def grade(score):
if score >= 90:
return "A"
if score >= 80:
return "B"
if score >= 70:
return "C"
return "F"
Each return exits the function immediately. Only one runs.
This is cleaner than storing a result and returning at the end. When you know the answer, return it right away.