human
Remove consecutive vowels from string | function which returns True or False for occurrence of a vowel.
this compares vowel with character 'c.
function to print resultant string.
print 1 st character.
loop to check for each character.
comparison of consecutive characters.
Driver code"
How can the above be solved in Python?
 Give me a code to remove consecutive vowels from string and the other steps required?
assistant
#Here is code to remove consecutive vowels from string and the other steps required.
 def is_vow ( c ) :
'
	return ( ( c == ' a ' ) or ( c == ' e ' ) or ( c == ' i ' ) or ( c == ' o ' ) or ( c == ' u ' ) ) ;
def removeVowels ( str ) :
	print ( str [ 0 ] , end = " " ) ;
	for i in range ( 1 , len ( str ) ) :
		if ( ( is_vow ( str [ i - 1 ] ) != True ) or ( is_vow ( str [ i ] ) != True ) ) :
			print ( str [ i ] , end = " " ) ;
str = " ▁ geeks ▁ for ▁ geeks " ;
removeVowels ( str ) ;