I have the following code;
if A:
X = find()
else:
X = find(all=True)
I need to add a new check - if C then find(amonut=C).
In other words, the code would look like:
if A:
if C:
X = find(amount=C)
else:
X = find()
elif C:
X = find(amount=C)
else:
X = find(all=True)
It looks very ugly. Is there a better way to achieve the same behavior?