PYTHON-BASICS5 MIN READ
Return values instead of printing everything
Decide whether a function should print, return, or do both.
Jin wrote a function that calculates monthly churn and prints the answer. Now Product wants the same number in a dashboard test.
Read the full lesson
Sign up free — one personalized lesson every day, matched to your role and goals.
Already have an account? Sign in