马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
上面的代码是否有重复赋值的问题,如果print(另外一个变量),是否会出现代码错误呢
一步步来,1.myteacher=‘小甲鱼’----------myteacher输出为小甲鱼
yourteacher=myteacher------------yourteacher输出为小甲鱼
yourteacher=‘黑夜’---------------yourteacher输出为黑夜
print(myteacher)这里输出myteacher,所以真相只有一个小甲鱼
2.myteacher=‘小甲鱼’--------------myteacher输出为小甲鱼
yourteacher=myteacher-------------yourteacher输出为小甲鱼
myteacher=‘黑夜’-----------------myteacher输出为黑夜
print(yourteacher)这题输出yourteacher,yourteacher输出为小甲鱼
3.first=520----------first为520
second=‘520’--------second为‘520’
first=second-----------first为‘520’
print(first),first为‘520’
|