At Westonci.ca, we connect you with experts who provide detailed answers to your most pressing questions. Start exploring now! Connect with a community of experts ready to provide precise solutions to your questions quickly and accurately. Get immediate and reliable solutions to your questions from a community of experienced professionals on our platform.

Write a function named add_surname that takes as a parameter a list of first names. It should use a list comprehension to return a list that contains only those names

Sagot :

def accumulating():

 List = []

 Strings = input("Please enter a list of strings: ")

 List = Strings.split(" ")

 return List

def length(n):

 r = []

 for i in n:

   r.append(len(n))

 return r

def main():

 y = accumulating()

 x = length(y)

 print(x)

main()