2.01
Completed
Values and Literals Values and Literals

Learn what Python values and literals are, including numbers, strings, booleans, and None.

Values and Literals

Sounds useful?

Jump into the interactive version.

No setup. No account. Just Python.

Interactive Python lesson

Values and Literals in Python

This Block introduces one of the first building blocks of Python: values written directly in code. You will learn what a value is, what makes something a literal, and how Python reads common literal forms like 42, 3.14, "hello", True, False, and None.

The focus is simple: look at small pieces of code, recognize the values inside them, and avoid the tiny syntax mistakes that beginners often run into. Quotes matter. Capital letters matter. And yes, "5" and 5 are not the same thing.

What you will learn:

  • Understand the difference between a value and a literal
  • Recognize integer, float, string, boolean, and None literals
  • Tell the difference between numbers and text that looks like numbers
  • Use correct capitalization for True, False, and None
  • Spot literals inside short Python programs
  • Fix common beginner mistakes with quotes and literal forms

By the end, you will be able to read small Python snippets more clearly and choose the right literal form for the value you actually mean.

> Start now 115 cards · about 11 min

Ready to practice this in the browser?

> Play now