Python return Statement
return Statement
The return statement is used to return the value of the expression back to the main function.
Example:
Output:
The return statement is used to return the value of the expression back to the main function.
Example:
def name(fname, mname, lname):
return "Hello, " + fname + " " + mname + " " + lname
print(name("James", "Buchanan", "Barnes"))
Output:
Hello, James Buchanan Barnes
Sorry, we detected that you have activated Ad-Blocker.
Please consider supporting us by disabling your Ad-Blocker, it helps us in developing this Website.
Thank you!