Hi,
I have a list of names, such as: words=[‘cat’, dog’, ‘lion’,‘snake’, ‘fox’]
I then want to write a function that looks at the words that start with c and s and validate that through an assertion as follow:
def
get_words_that_start_with(letter):
return
assertion(
'8a'
, get_words_that_start_with(
'c'
), [
'cat'
])
assertion(
'8b'
, get_words_that_start_with(
's'
), [
'snake'
])