Fixed the `get_tastes` function

Replaced eval with getattr- remember, you should almost never use eval in Python.
Replaced the for loop with a list comprehension
Removed the global statement. It isn't needed as long as the variable isn't being modified.