I need to make this python code to only take one parameter. Right now it takes multiple.

def get_list():
    return [input("Please enter a string: ") for i in range(int(input("Please enter the number of strings you want to input\n")))]

def longest(lst):
    return max(lst, key = len)

def alpha(lst):
    return [e for e in lst if e.isalpha()]

if __name__ == "__main__":
    lst = get_list()
    lst.sort()
    print (longest(lst))
    print (", ".join(alpha(lst)))

I don't understand the statement that this python code takes multiple parameters nor how it could take only one parameter. Can you elaborate on this so that everybody understands what you want ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.