擅长:python、mysql、java
<p>从逻辑上讲,您的代码如下所示:</p>
<pre><code>if 'GIN' exists
or if 'NOT READY' exists
or if 'TO BE ABANDON OR NEEDS RESUBMISSION' is equal to retVal
do something
</code></pre>
<p>阅读这篇<a href="http://docs.python.org/2/library/stdtypes.html#truth-value-testing" rel="nofollow">link</a>关于python中真值的文章(这也与paxdiablo的答案有关)。你知道吗</p>
<p>更好的方法是使用python的“in”语句:</p>
<pre><code>if retVal in ['GIN', 'NOT READY', 'TO BE ABANDON OR NEEDS RESUBMISSION']:
do something
</code></pre>