I need to define a function that may or may not take one argument of the 3 arguments defined in a function. However, I get an error message as invalid syntax.
Now, if I make my third argument as variable [value3], I get an error message as 'float' object is not iterable.
Also, I have realized that when all the arguments are passed, it creates a tuple, which is unfavorable.
Could someone help me solve the problem?
def createValues(value1, *value2, value3):
value = dict()
value["VALUE1"] = value1
value["VALUE2"] = value2
value["VALUE3"] = value3
print (value["VALUE1"],value["VALUE1"],value["VALUE1"])
createValues(2000,21000001,1)
createValues(2000,,1)