我需要能够向我显示一个单词中连续辅音的代码.例如,因为"concertation"我需要获得["c","nc","rt","t","n"].
这是我的代码:
def SuiteConsonnes(mot):
consonnes=[]
for x in mot:
if x in "bcdfghjklmnprstvyz":
consonnes += x + ''
return consonnes
Run Code Online (Sandbox Code Playgroud)
我设法找到辅音,但我不知道如何连续找到它们.谁能告诉我我需要做什么?