adplus-dvertising
frame-decoration

Question

What is the output of the following piece of code?
>>> a=(2,3,1,5)
>>> a.sort()
>>> a

a.

(1,2,3,5)

b.

(2,3,1,5)

c.

None

d.

Error, tuple has no attribute sort

Posted under Python

Answer: (d).Error, tuple has no attribute sort

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of the following piece of code?