CBSE Class 12 Computer Science
Question 22 of 68
Data Structures - I : Linear Lists — Question 4
Back to all questionsprints all characters of my_string that aren't vowels
Reason — The expression [print(i) for i in my_string if i not in "aeiou"] is a list comprehension that iterates over each character i in the string my_string. It checks if the character i is not a vowel (i.e., it's not in the string "aeiou"). If i is not a vowel, it prints the character i.