0Pricing
Python Academy · Lesson

Variables and Assignment

Understand how variables work in Python and how to assign values.

Welcome to Variables

In Python, a variable is a named container that stores a value. You create one simply by assigning a value with =.

Your First Variable

Write: name = 'Alice' This stores the string 'Alice' under the label 'name'. Python infers the type automatically.
name = 'Alice'
print(name)

All lessons in this course

  1. Variables and Assignment
  2. Numeric and Boolean Types
  3. Strings and Type Conversion
  4. Reading User Input
← Back to Python Academy