List manipulation in functions


#1

I am trying to rewrite the code by taking the input manually by user,but its not working

n=input("enter the three numbers")
def list_extender(lst):
lst.append(9)
return lst
print (list_extender(n))

heellpp!!


#2

Hi you numbers should be inside a list so you could put. here

n=input("enter the three numbers")

the input("enter the three numbers") bewteen [] so that your number will be inside a list.


#3

thanks dude :slight_smile: it worked