Examveda

Read the information given below carefully and write a list comprehension such that the output is: ['e', 'o']
w="hello"
v=('a', 'e', 'i', 'o', 'u')

A. [x for w in v if x in v]

B. [x for x in w if x in v]

C. [x for x in v if w in v]

D. [x for v in w for x in w]

Answer: Option B


This Question Belongs to Python Program >> Lists In Python

Join The Discussion

Related Questions on Lists in Python