Python-Quizzes | Python Tuples Quiz | Question 9

Last Updated :
Discuss
Comments

What is the output of the following program?

Python
li = [2e-04, 'a', False, 87] 
tup = (6.22, 'boy', True, 554) 
for i in range(len(li)): 
	if li[i]: 
		li[i] = li[i] + tup[i] 
	else: 
		tup[i] = li[i] + li[i] 
		break

[6.222e-04, ‘aboy’, True, 641]

[6.2202, ‘aboy’, 1, 641]

TypeError

[6.2202, ‘aboy’, False, 87]

Share your thoughts in the comments