In Python, how can I check if *args[0] exists?
def my_fxn(self, *args):
print(args[0])
my_fxn('ABC') # this prints 'ABC'
my_fxn() # this crashes with "IndexError: tuple index out of range"
In Python, how can I check if *args[0] exists?
def my_fxn(self, *args):
print(args[0])
my_fxn('ABC') # this prints 'ABC'
my_fxn() # this crashes with "IndexError: tuple index out of range"