已读18%
预计阅读本页时间:-
预计阅读本页时间:-
Test Your Knowledge: Quiz
- Consider the following three statements. Do they change the value printed for A?
A = "spam"
B = A
B = "shrubbery" - Consider these three statements. Do they change the printed value of A?
A = ["spam"]
B = A
B[0] = "shrubbery" - How about these—is A changed now?
A = ["spam"]
B = A[:]
B[0] = "shrubbery"