β back to unit
Easy
# searching easy
Not on This List
The 'Do Not Feed' list hangs by the petting zoo gate, and you REALLY want to feed the alpaca. π¦
You get the banned list and an animal. Print go ahead if the animal is NOT on the list, or not allowed if it is.
Example:
Input: banned = ["goat", "emu", "pony"], animal = "alpaca"
Output: go ahead
alpaca is never found on the banned list, so it's safe to feed β print go ahead.
Input: banned = ["goat", "alpaca"], animal = "alpaca"
Output: not allowed
alpaca IS on the banned list this time, so we print not allowed.
π‘ need a hint?
srch-not-on-list.pyπ given lines are locked β write your code in between
loading...