Python switch case allowing optional arguments
<p>I understand that there are no switch cases in python and that a dictionary can be used instead. But what if i want to pass arguments the function zero() but no arguments to one()? I didnt find any question related to this.</p>

<pre><code>def zero(number):
    return number == "zero"

def one():
    return "one"

def numbers_to_functions_to_strings(argument):
    switcher = {
        0: zero,
        1: one,
        2: lambda: "two",
    }
    # Get the function from switcher dictionary
    func = switcher.get(argument, lambda: "nothing")
    # Execute the function
    return func()
</code></pre>

<p>what is the simplest way to implement this without having to separate them into two cases? i think that func() would need to take the (optional) arguments?</p>