# Given value = None, print True if value is None, then print False if value is not None

Canonical URL: <https://datadriven.io/problems/given-value-none-print-true-if-value-is-none-then-print-9531b15e>

Domain: Python · Difficulty: medium

## Problem

Given value = None, print True if value is None, then print False if value is not None. Next, given x = 5 and y = 5, print True if x == y and x is y (for small ints Python caches them).

## Related

- [All practice problems](https://datadriven.io/problems)
- [Mock interview mode](https://datadriven.io/interview/given-value-none-print-true-if-value-is-none-then-print-9531b15e)
- [Python Interview Questions](https://datadriven.io/python-interview-questions)
- [Data Engineering Interview Prep Guide](https://datadriven.io/data-engineer-interview-prep)
- [Daily Challenge](https://datadriven.io/daily)

---

Source: DataDriven (https://datadriven.io). 100% free data engineering interview prep. Live code execution against Postgres 16, Python 3.11, and Spark sandboxes. No paywall, no premium tier, no signup gate.