第176页 | Learning Python | 阅读 ‧ 电子书库

同步阅读进度,多语言翻译,过滤屏幕蓝光,评论分享,更多完整功能,更好读书体验,试试 阅读 ‧ 电子书库

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"

请支持我们,让我们可以支付服务器费用。
使用微信支付打赏


上一页 · 目录下一页


下载 · 书页 · 阅读 ‧ 电子书库