What Will Be The Output Of The Following Python Codep Pre #423
What will be the output of the following Python code?</p> <pre><code class="language-python">l=["good", "oh!", "excellent!", "#450"] [n for n in l if n.isalpha() or n.isdigit()]</code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs109 Python. It can also be found in gs gs109 List Comprehension - Python List Comprehension - Quiz No.1.
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()]
[‘good’, ‘oh’, ‘excellent’, ‘450’ ]
[‘good’]
[‘good’, ‘#450’]
[‘oh!’, ‘excellent!’, ‘#450’]