Report Bug

Qus

What will be the output of the following Python code snippet?

      k = [print(i) for i in my_string if i not in "aeiou"]
Qusनिम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?


A. prints all the vowels in my_string
B. prints all the consonants in my_string
C. prints all characters of my_string that aren’t vowels
D. prints only on executing print(k)


Solution
C. prints all characters of my_string that aren’t vowels



Explanation
print(i) is executed if the given character is not a vowel.
CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad