List Membership#
Write a function called is_present
that takes in two parameters: an integer and a list of integers (NB the first parameter should be the integer and the second parameter should be the list) and returns True
if the integer is present in the list and returns False
if the integer is not present in the list.
You can pick everything about the parameter name and how you write the body of the function, but it must be called is_present
.
The code challenge will call your is_present
function with many inputs and check that it behaves correctly on all of them. Your task is to only write the is_present
function.
Sample Input:
10
[1,2,3,4,10]
Sample Output:
True