word = input("Tell me the word you wish to check for diphthongs: ")total = 0diphthongs = ['ue', 'ie', 'ae', 'ee', 'oe', 'ui', 'ii', 'ai', 'ei', 'oi', 'ua', 'ia', 'aa', 'ea', 'oa', 'uo', 'io','ao', 'eo', 'oo', 'uu', 'iu', 'au', 'eu', 'ou']stripped = word.strip('abcdfghjklmnpqrstvwxyz')for letter in diphthongs: if letter in stripped: total += 1print("There are", total, "diphthongs in the string")
It can count 1 diphthong, but doesn't recognize the same diphthong twice, like c[ou]rth[ou]se, I also need to make it not recognize qu when searching for diphthongsPlease and thank you?
I have tried splitting the diphthongs into regular vowels, I have tried range and len functions, but none seem to make it any easier, and the best results have come from what I have used so far.