Python-Quizzes | Python List Quiz | Question 18

Last Updated :
Discuss
Comments

Find the output of the following program: 

Python
a = ['Geeks', 'for', 'Geeks'] 
b = [i[0].upper() for i in a] 
print(b) 

[‘G’, ‘F’, ‘G’]

[‘GEEKS’, ‘FOR’, ‘GEEKS’]

[‘GEEKS’]

Compilation error

Share your thoughts in the comments