In Python, you can check if an item is in a list using the in keyword.
In Twig, you can use the exists function to check if a specific key of an array exists.