Python-Quizzes | Python List Quiz | Question 25

Last Updated :
Discuss
Comments

Find the output of the following program: 

Python
def REVERSE(a): 
	a.reverse() 
	return(a) 
def YKNJS(a): 
	b = [] 
	b.extend(REVERSE(a)) 
	print(b) 

a = [1, 3.1, 5.31, 7.531] 
YKNJS(a) 

[1, 3.1, 5.31, 7.531]

[7.531, 5.31, 3.1, 1]

IndexError

AttributeError: ‘NoneType’ object has no attribute ‘REVERSE’

Share your thoughts in the comments