Assign a New Value

And once you make a variable, you can give it a new value.

Try typing this example. You're making a variable with the name colour , then giving it the string "yellow" as a value:

>>> colour = "yellow"

>>> colour

'yellow'

Now type the word colour and press Enter. Python should return the value of your variable, "yellow".

Now let's give colour a new value. Go ahead and type this second example as it's written - remember that the variable doesn't have quotes around it, but the new value, "red", does have quotes because it's a string:

>>> colour = "red"

>>> colour

'red'

When you enter the variable name again, you should see the new value.

Go ahead and try giving your variable some other new values, like different strings or even some numbers.

>>> colour = "fish"

>>> colour

'fish'

>>> colour = 12

>>> colour

12