Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Variables

Variables are containers for storing data values.

Types

There are a few main types you’ll use often:

Defining a variable

It’s super easy to define a variable. Do so with the following format: name = value

You do not need to say what type of variable it is. Python will figure that out for you. You can even change the type of a variable later on.

Try defining a string called team with the value "Spartronics"

Changing the value of a variable

To change a value of a variable, you just redefine it