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
Post a Comment