Lazo Lab Sign up

Python Fundamentals / Getting started

Lesson 5 of 38

Variables

A variable is a name that points to a value. Create one with =. Names should describe what they hold, use lowercase and underscores, and can't start with a number.

Key points

  • name = value
  • Use snake_case names
  • You can change a variable later
player_name = "Fahad"
score = 0
score = score + 10
Watch a video on thisOpens YouTube search results for “Variables” in a new tab

Quiz · +10 XP

Which is a valid Python variable name?

Log in to save progress and earn XP.