Python Forum
How to continue after "return"
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to continue after "return"
#2
if you need to return two things, you return a tuple:

def add_mul(x, y):
    return x + y, x * y
So on lines 3 and 12 I would store what your are returning there in a variable, and return that variable along with the other values returned later.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
How to continue after "return" - by Helmi - Mar-16-2019, 12:35 AM
RE: How to continue after "return" - by ichabod801 - Mar-16-2019, 02:31 AM
RE: How to continue after "return" - by Helmi - Mar-16-2019, 11:20 AM
RE: How to continue after "return" - by Yoriz - Mar-16-2019, 12:40 PM
RE: How to continue after "return" - by Helmi - Mar-17-2019, 09:26 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020