How to correctly define a function?

前端 未结 6 1807
情歌与酒
情歌与酒 2020-12-21 08:22

In python I\'m trying to do the following to define a function:

count_letters(word) = count_vowels(word) + count_consonants(word)

But for

6条回答
  •  情话喂你
    2020-12-21 08:40

    having defined function: count_vowels(word) and count_consonants(word)

    then you can do this: count_letters = count_vowels(word) +count_consonants(word)

    hope it help! thanks

提交回复
热议问题