0
def greet(x,y):
    z=[]
    z=x.append(y)
    return "Hi your ful name is : %s \n your firstname: %s \n lastname: %s" %(z.title(),x,y)

f_name=[]
l_name=[]

f_name=list(input("enter your firstname : ")) 
l_name=list(input("entere your lastname: "))

print(greet(f_name,l_name))

1 Answers1

-1

This happens because when we use x.append(y), the operation is performed on x and hence nothing is returned when we append() as it happens when we use sort() with a list.Hence z is None type object

Mehul Gupta
  • 1,829
  • 3
  • 17
  • 33