If I have a function defined with default values, and I want to use them conditionally Eg. In the function below -
def foo(arg1='some_default_string1', arg2='some_default_string1'):
    print(arg1,arg2)
If I had to call the function with a1_string/a2_string either having values or not.
if a1_string and not a2_string:
    foo(a1_string)
elif not a1_string and a2_string
    foo(a2_string)
elif a1_string and a2_string:
    foo(a1_string, a2_string)
else:
    foo()
could this be done in a single line such as
foo(a1_string?, a2_string?)


foo(a2_string="XXXXX")or could you use**kwargsto get what you want?arg1andarg2anyway, then you don't need the default value because they are used when there are fewer arguments than defined. Just do something likeprint(arg1 or "default1", arg2 or "default2")a1_stringanda2_string) and the output you want in each case?