测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A59922. 有关下面Python代码的说法,错误的是( )。1 def Sort(lst)

单选题

题目描述

有关下面Python代码的说法,错误的是( )。

1 def Sort(lst):
2  for i in range(1, len(lst)):
3   key = lst[i]
4   j = i - 1
5   while j >= 0 and key < lst[j]:
6    lst[j + 1] = lst[j]
7    j -= 1
8   lst[j + 1] = key
9 lst = [4,5,13,2,7,10,1,3,8,11,6,9,12]
10 lst = Sort(lst)
11 print("sorted list:", lst)

选项(单选)