Quiz-6: Functions

Hi Team, As Per my Knowledge Here the second statement is correct but why is it showing an error

Kindly Someone explain to me if I am wrong.

Thanks
K.Surya Phanindra

1 Like

@suryaphani56
Yes all options are correct so answer will be d)all of them

Because sort() function will sort the same X (i.e. in place)
But sorted() function will return new x (or whatever variable you will use to store the sorted value) having sorted() values of previous container x.

Hope your concepts is clear now❤️

1 Like