• 2022-07-28
    已知列表lst=[1,2,3],则分别执行以下代码,结果为[9,4,1]的是:
    A: for i in lst: i=i**2print(lst)
    B: for i in range(0,3): lst[i]**=2print(lst)
    C: for i in range(1,4): lst[3-i]=i**2print(lst)
    D: for i in range(2,-1,-1): lst[i]**=2print(lst)
  • 举一反三