Data Cleaner (List Comp)

Easy
#lists #data-processing

Input: `data` (list). Return: List with all `None` values removed using a List Comprehension.

Example

Input: 1, None, 2, 3
Output: [1, 2, 3]
Need a hint?
  • Use: [x for x in data if x is not None]
Run your code to see output