擅长:python、mysql、java
<p>您可以使用内置的<a href="https://docs.python.org/3/library/functions.html#any" rel="nofollow noreferrer">^{<cd1>}</a>。在</p>
<blockquote>
<p><a href="https://docs.python.org/3/library/functions.html#any" rel="nofollow noreferrer">Return True if any element of the iterable is true. If the iterable is empty, return False.</a></p>
</blockquote>
<pre><code>if any(tag['key'] == 'ecs_scaling' for tag in data['Tags']):
...
</code></pre>