Home > other >  Excuse me what should fill in the last empty, the trouble to the analysis process, thank you
Excuse me what should fill in the last empty, the trouble to the analysis process, thank you

Time:09-20


13. In Python has s=[6], the Max value (s) for _6_; Min (s) value is _1_ : statement sequence "s [1]=[]; S [: 2]='a'; S/2:=b: s [2]=[' x ', 'y']; Dels [1] "executed, s value is _____

CodePudding user response:

 s=[6] 

S [1]=[]; S [: 2]='a';='b' s [2:]; S [2]=[' x ', 'y']; Del s [1]
Print (s)


[4 'x', 'y']

CodePudding user response:

reference 1st floor weixin_45903952 response:
 s=[6] 

S [1]=[]; S [: 2]='a';='b' s [2:]; S [2]=[' x ', 'y']; Del s [1]
Print (s)


[4 'x', 'y']

Can you explain the

CodePudding user response:

[2, 3, 4, 5, 6] s [1]=[] to the first element is empty
[' a ', 4, 5, 6] [: 2]='a' s 1, 2 elements' becomes a '
[' a ', 4, 'b'] 's [2:]=' b 'make after the third element of the' b '
[' a ', 4 'x', 'y'] 's [2]=[' x', 'y'] to make 3 or 4 elements into the x, y
[4 'x', 'y'] del s [1] to delete the first element

CodePudding user response:

The
reference 3 floor weixin_45903952 response:
[2, 3, 4, 5, 6] s [1]=[] to make the first element is empty
[' a ', 4, 5, 6] [: 2]='a' s 1, 2 elements' becomes a '
[' a ', 4, 'b'] 's [2:]=' b 'make after the third element of the' b '
[' a ', 4 'x', 'y'] 's [2]=[' x', 'y'] to make 3 or 4 elements into the x, y
[4 'x', 'y'] del s [1] to delete the first element

Got it, thank you??????
  • Related