Skip to main content
Part 2 of 7 · Chapter 4 of 4

What Counts as Empty, False, or Equal

Python will evaluate almost anything as true or false, including things that are neither. Feed in an empty list, the number zero, and the string that spells the word False, and see which ones the language actually treats as false.

Beginner8 min read

Read first: Ordered Collections, Two Ways


Make a free account to read on

Every chapter is free — an account is how your progress, XP, and streak follow you from your laptop to your phone, and how you show up on the leaderboard. No payment, no trial.