Why this python code cannot be executed in VS Code but works in Jupyter notebook? how do you print the output?
def get_even(numbers): return [num for num in numbers if not num % 2]get_even([1, 2, 3, 4, 5, 6])
output expected is:
[2, 4, 6]
Why this python code cannot be executed in VS Code but works in Jupyter notebook? how do you print the output?
def get_even(numbers): return [num for num in numbers if not num % 2]get_even([1, 2, 3, 4, 5, 6])
output expected is:
[2, 4, 6]