Q. What will be the output produced by following code ?


text = ['h', 'e', 'l', 'l', 'o']

print (text)

vowels = "aeiou"

newText = [x.upper() for x in text if x not in vowels ]

print (newText)


Answer :-

Output:-

['h', 'e', 'l', 'l', 'o']
['H', 'L', 'L']

>>>

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post