{% tabs %} {% tab title="Python" %}
class Solution:
def halvesAreAlike(self, s: str) -> bool:
def count(s):
cnt = 0
for c in s.lower():
if c in ["a","e","i","o","u"]:
cnt += 1
return cnt
return count(s[:len(s)//2]) == count(s[len(s)//2:])
{% endtab %} {% endtabs %}