Just wondering if it is possible to use both an optional argument in the same function as multiple arguments. I've looked around and I feel as if I just have the vocabulary wrong or something. Example:
def pprint(x, sub = False, *Headers):
pass
Can I call it still using the multiple headers without having to always put True
or False
in for sub? I feel like it's a no because Headers
wouldn't know where it begins. I'd like to explicitly state that sub = True
otherwise it defaults to False
.