Check a list for value #
Write a function that checks if a given value exists in a list. The function takes a list as the first argument and the value to find in the second argument.
We recommend that you do not use the in operator for this challenge and try to solve the problem on your own.
Tests #
does_list_contain([1, 2, 3], 1)should returnTruedoes_list_contain([1, 2, 3], 0)should returnFalsedoes_list_contain(["A", "B", "C"], "A")should returnTruedoes_list_contain(["A", "B", "C"], "a")should returnFalsedoes_list_contain(["A", "B", "C"], 0)should returnFalse
Getting Started with Python
Data Types
Python Functions
Statements in Python
Basic Debugging in Python
Basic Algorithm
Object-Oriented Programming
Error Handling
Intermediate Algorithm
Python Modules