1

This question already has an answer here:

I'm a junior developer learning programming in Python. I found that some of functions I write uses too many parameter, like

def f(a,b,c,d,e,g,h):

What would one recommend to avoid such a situations? I heard about classes but have not yet learned them thus far. Is it wise to make function to work like this:

def f(params):

def g():
    params = list()
    params.append(a) 
    params.append(b)
    params.append(c)  
    params.append(d)
    params.append(e)
    params.append(g)
    params.append(h)
    f(params)

marked as duplicate by gnat, Doc Brown, Christophe, Jörg W Mittag, candied_orange Aug 20 '16 at 13:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Browse other questions tagged or ask your own question.