Site icon Exam4Training

Which one of the lines should you put in the snippet below to match the expected output?

Which one of the lines should you put in the snippet below to match the expected output?

Expected output:

Code:

A . sorted(list)
B . sort(list)
C . list.sort()
D . list.sorted()

Answer: C

Exit mobile version