擅长:python、mysql、java
<p>这些简单的更改可以为您实现以下目的:</p>
<pre><code>consonants = "bcdfghjklmnpqrstvwyz"
vowels = "aeiou"
def checkString(st):
for i in range(len(st)):
if i % 2 == 0:
if st[i] not in consonants:
return False
else:
if st[i] not in vowels:
return False
return True
</code></pre>