Skip to content

Instantly share code, notes, and snippets.

@brentxphillips
Last active July 4, 2021 20:38
Show Gist options
  • Select an option

  • Save brentxphillips/fa507765cf04eda4c4d82afbbcd3cbf1 to your computer and use it in GitHub Desktop.

Select an option

Save brentxphillips/fa507765cf04eda4c4d82afbbcd3cbf1 to your computer and use it in GitHub Desktop.
Simple value return function, with nested conditional
# Simple value returning function, two retunred values
# return_test4.py
def pass_info(x, y):
add = x + y
# adding a nested condition and operation doesn't seem to impact return statement
if add < 10:
add = 11
return add
def main():
output = pass_info(5, 4)
print(output)
main()
# outputs: 11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment