这不是在python中声明函数的方式。您要写的是:
def count_letters(word): return count_vowels(word) + count_consonants(word)
也就是说,如果您已经具有
count_vowels和
count_consonants函数。

这不是在python中声明函数的方式。您要写的是:
def count_letters(word): return count_vowels(word) + count_consonants(word)
也就是说,如果您已经具有
count_vowels和
count_consonants函数。