What is the output of the following code ?
>>> s1 = [16, 21, 72, 31, 91, 6, 12] >>> s2 = s1.sort() >>> s1, s2
([6, 12, 16, 21, 31, 72, 91], [6, 12, 16, 21, 31, 72, 91])
([16, 21, 72, 31, 91, 6, 12], [16, 21, 72, 31, 91, 6, 12])
([6, 12, 16, 21, 31, 72, 91], None)
Error
s1.sort() sorts elements of the list in place, but does not return anything means returns None
so s1 will be [6, 12, 16, 21, 31, 72, 91].and s2 will be None
Comment here: