Python Changing a the value of a string variable -


I'm new to Python, and I want to know a way to change a set string variable. For example:

For example:

  name = 'school'  

How would I go about changing it if I had a different I want to use name variables for George , Ben , jes , kt , etc. values ​​like

You can assign a new value to a variable the way you originally assigned it one IS: Using the assignment operator, = .

  name = 'present value of the name' school 'print:', name is named = 'George' print 'is the current value of the name:', name  

Result:

  The name of the present value is: The present value of the school is: George  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -