What will be the output of the following Python code?
s=["pune", "mumbai", "delhi"]
[(w.upper(), len(w)) for w in s]
s=["pune", "mumbai", "delhi"]
[(w.upper(), len(w)) for w in s]
A. Error
B. ['PUNE', 4, 'MUMBAI', 6, 'DELHI', 5]
C. [PUNE, 4, MUMBAI, 6, DELHI, 5]
D. [('PUNE', 4), ('MUMBAI', 6), ('DELHI', 5)]
Answer: Option D
Join The Discussion