Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What is the output of print(k) in the following Python code snippet?
k = [print(i) for i in my_string if i not in “aeiou”]
print(k)

What is the output of print(k) in the following Python code snippet?
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

Answer: b
Explanation: print() returns None.

Join The Discussion