adplus-dvertising
frame-decoration

Question

What is the output of print(k) in the following?
k = [print(i) for i in my_string if i not in "aeiou"]
print(k)

a.

all characters of my_string that aren’t vowels

b.

a list of Nones

c.

list of Trues

d.

list of Falses

Posted under Python

Answer: (b).a list of Nones

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of print(k) in the following?