Home > other >  How to modify the variable points to address
How to modify the variable points to address

Time:12-03

The following code
Name1='aaa'
Name2 name1=
Print (" name1: % s \ nname2: % s "% (name1 name2))
Name1='BBB'
Print (" I have assigned the new value to name1. Let 's see what happens to name2!" )
Print (" name1: % s \ nname2: % s "% (name1 name2))

O
Name1: aaa
Name2: aaa
I have renamed name1 to new_name. Let 's see what happens!
Name1: BBB
Name2: aaa

Name2 values have not changed, so how to memory to address change name1 name2? Thank you ~

CodePudding user response:

Another assignment, name2=name1
  • Related