Create tuple ( first vowel , last vowel , total vowels )
if ( vowel [ 0 ] , vowel [ Len - 1 ] , Len ) in map . keys ( ) : NEW_LINE INDENT map [ ( vowel [ 0 ] , vowel [ Len - 1 ] , Len ) ] . append ( i ) NEW_LINE DEDENT else : NEW_LINE INDENT map [ ( vowel [ 0 ] , vowel [ Len - 1 ] , Len ) ] = [ i , ] NEW_LINE DEDENT count = 0 NEW_LINE for i in map : NEW_LINE