Python use the return statement to come up with a value . Sometimes, user don’t need direct Output, so it uses return statement. return statement ,using processed value. Suppose the user wants to come up with full name but we can’t come directly so,we use return statement.
def name(fname,lname):
""" return statement
using to come up
with full_name """
# store in a
variable
full_name =fname+"
"+lname
return
full_name.title()
>>>musicians
=name("vipul
","kunwar ")
print(musicians)
Output:
Vipul Kunwar