0
def info(name, address):

    name = (input ("Please Enter Your Name : "))
    address = (input ("Please Enter Your Address : "))


    return name
    return address



def userinfo():

    sumom=info(name='', address='')

    print("Thank you for coming Mr. "+sumom)
userinfo()

Hello Folks! problem is here only "name" is printing but not "address" on userinfo() function, Can someone please help me out?

2
  • Multiple return points in your function will not both be executed. When your function hits the first return point return name the method will return and execution of the method's body will be complete. To return both items, try something similar to: def names(first, last): return (first, last) Commented Oct 31, 2017 at 11:33
  • Done, Thanks...@SeanWhittaker Commented Oct 31, 2017 at 13:23

1 Answer 1

0

After return statement the program leaves function, so your second return is not executed.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.