NEW Explore the Scratch Block Dictionary, tutorials, textbook, and classroom guides

Start learning →

(list) contains (thing)? — Scratch Block Guide

📌 What you will learn

Boolean block returning true if an exact item exists anywhere in the list.

What this block does

Boolean block returning true if an exact item exists anywhere in the list.

Check whether the player already picked up a key or visited a room.

  • Category: Variables & Lists
  • Key tip: Much cleaner than maintaining 15 separate "has_item_1" variables.

Working Scratch example

Try building this small script in the Scratch editor, predict what will happen, then click the green flag to test it.

Example using (list) contains (thing)?
  1. When green flag clicked
  2. If (bag) contains (Golden Key)? then
  3. Say Door unlocked!

Try it: Unlocks the door cleanly if Golden Key is in the inventory list.

Related block guides

Explore other blocks in the same category or return to the full English Block Dictionary.

Back to Variables & Lists See the overview and patterns for Variables & Lists. Learn more → Scratch Block Dictionary (All Categories) Browse Motion, Looks, Sound, Events, Control, Sensing, Operators, Variables, and Extensions. Learn more →

FAQ

When should I use "(list) contains (thing)?" in Scratch?

Check whether the player already picked up a key or visited a room. Much cleaner than maintaining 15 separate "has_item_1" variables.

This guide is provided for educational purposes. Scratch screens and terms may change over time, so please check the official Scratch website as well.