📅  最后修改于: 2023-12-03 15:11:58.744000             🧑  作者: Mango
本程序用于计数具有以下特征的字谜:
from count_consonant_puzzle import count_consonant_puzzles
count = count_consonant_puzzles(list_of_words)
list_of_words
: 一个包含多个单词的列表该函数返回符合上述特征的字谜数量。
from count_consonant_puzzle import count_consonant_puzzles
word_list = ['puzzle', 'saxophone', 'badge', 'xylophone', 'cucumber']
count = count_consonant_puzzles(word_list)
print(f'The number of consonant puzzles in the list is: {count}')
输出:
The number of consonant puzzles in the list is: 1