python - Testing to see if a word contains only specified syllables -


I have to check that only one syllable contains only one word. For example, if a word "pickuppieu" contains only syllables , "P", "ka", or "chu", then I have to return "yes". If there are other syllables or characters in it, I want to "no" back.

Another example:

The word "peakapacchudo" returns

Returns: "No" because it contains 'P', 'K' and 'Chu' P>

There is no other word for describing a stroke where each letter is open and the nuclei Is always done by a cluster before. (With some extra, which I hope is unimportant here, Japanese is a language with this structure.) In this way you get a regular expression like pc Aeou]

to describe each syllable.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -