← Back to challenges

Remove None from a List

PythonHardlanguage_fundamentalsarraysformatting

Instructions

Create a function to remove all None values from a list.

Examples

remove_none(["a", None, "b", None]) ➞ ["a", "b"]

remove_none([None, None, None, None, None]) ➞ []

remove_none([7, 8, None, 9]) ➞ [7, 8, 9]

Notes

N/A

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Multiply by Length