Menu

Sign in to track your progress and unlock all features.

Theme style

Log in

Full lesson preview

Use None as a Value

Learn how to return None from a function and understand how None is used as a value in Python.

Python practice8 minVariables & Data TypesBeginnerLast updated December 29, 2025

Problem statement

Implement a function that accepts any single argument but always returns the Python value None. Do not print anything. When the test harness evaluates your function, remember that None will be represented as an empty string in the test comparison, so the correct return value is the Python None object.

Task

Implement a function that always returns None, regardless of the input provided.

Examples

Return None for number

Input

set_to_none(7)

Output

None

The function should return None regardless of the provided value.

Return None for string

Input

set_to_none('hello')

Output

None

Even a string input should result in None being returned.

Input format

A single argument of any type is passed to the function set_to_none(value).

Output format

Return None (the Python None object).

Constraints

Do not print. Always return None.

Samples

Sample 1

Input

set_to_none(100)

Output

None

Regardless of the input, the function returns None.