Examveda

What will be the output of the following Python code?
l=["good", "oh!", "excellent!", "#450"]
[n for n in l if n.isalpha() or n.isdigit()]

A. ['good', 'oh', 'excellent', '450' ]

B. ['good']

C. ['good', '#450']

D. ['oh!', 'excellent!', '#450']

Answer: Option B


This Question Belongs to Python Program >> Lists In Python

Join The Discussion

Related Questions on Lists in Python