def check_for_good_student(good_bad_student_list): if "good_student" in good_bad_student_list: return True return False
Check for Something in List
When Christmas rolls around, everybody knows Santiago, AKA Santa,
has to check his list twice.
Lets help him do that!
Create a function that uses the keyword
in to verify if there are any good
students in his list. Check for the string
good_student and return
depending if it is present.
test not present in list - Run Test
def test_not_present_in_list(): assert check_for_good_student(['bad_student', 'terrible_student', 'Santiago']) == False
test present in list - Run Test
def test_present_in_list(): assert check_for_good_student(['bad_student', 'good_student', 'decent_student']) == True