擅长:python、mysql、java
<p>我想这就是你想要的:</p>
<pre><code> Class SomeClass(object):
def __init__(self):
self.config = ['something', 'this exists', 'some more stuff']
def check_this(self):
if "this exists" in self.config:
return True
else:
return False
</code></pre>