0

In my last question the answer helped me solve an issue of choosing Number against other arguments.

Then out of curiosity I though what if I actually had to use char2 or char1 or char3 etc.. without referring to a list that'll let me use them based on their placement in the argument.

The best way I could find after some research is creating a dynamic array for the arguments where each argument is an object in 1 class dedicated for that purpose, and actually separate them based on their object distinction. That being said couldn't find any examples to clarify that method or walk me through the process step by step.

So I'd like to get ways on how to solve that issue and walking through the process.

Garf365
  • 3,619
  • 5
  • 29
  • 41
Tim
  • 59
  • 1
  • 8

1 Answers1

0

So if I'm understanding you correctly:

You want to pass char2,char1,char3 to your function and process this input not in terms of position, like you did with args, but in terms of "names". The solution are **kwargs. What do they do ? A good Explanation might be given here.

If this doesn't solve your problem or doesn't even fit for the question please clearyfy your question.

Chgad
  • 820
  • 2
  • 7
  • 18