'Simple python question. How do I make the values in my list read in an input. I know this is prob too basic for u guys but I need to figure this out

This is my work and it wont read the items inside my list. What should I do?
Solution 1:[1]
Should be:
if bag in notallowed:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Gonzalo Odiard |
