This is similar to method overloading. When print Hello(1, 2, 3) gets executed it returns "a and b" whereas I want it to return "a and b and c". I know I could have said if (a and b and c is None) then it would have worked. But if I had 20 parameter and I have to handle every case it would be just multiple if statements which I don't think should be necessary. Is there a better way I should be doing such a problem?
def Hello(a=None, b=None, c=None):
if(a and b):
return "a and b"
if(a and c):
return "a and c"
if(a and b and c):
return "a and b and c"
print Hello(1, 2, 3)