Do action based on parameters received
<p>I am writing an api that accepts two parameters "a" &amp; "b". After receiving the parameters, it checks if their existence and do some actions based on which parameters have received. Here is some psudo code.</p>

<pre><code>args = get.parameters

if "a" in args:
    print "x" # execute "x"
if "b" in args:
    print "y" # execute "y"
if both exists:
    print "x" # execute "x"
</code></pre>

<p>What will be the best way to do that?</p>
