擅长:python、mysql、java
<pre><code>def f(*args):
if args[1:] == args[:-1]: #test all args passed are equal
id = args[0] #set your 'id' to the first value
else:
return None # just as an example
# do things ...
return id
>>> f(1,2,3,4)
None
>>> f(1,1,1,1)
1
</code></pre>