Question: Which of the following programs will output [ 1 , 4 , 9 , 0 ] ? squares = [ 9 , 4 , 1

Which of the following programs will output [1,4,9,0]?
squares =[9,4,1]
squares = squares.sort()
squares.append(0)
print(squares)
squares =[9,4,1]
squares.sort()
squares.extend(0)
print(squares)
squares =[9,4,1]
squares.append(0)
squares.sort()
print(squares)
squares =[9,4,1]
squares.sort()
squares.append(0)
print(squares)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!