Yes it is. Do you get the error on the next line in the program? We don't know since you didn't include the entire error message, but it appears that the compiler has gone to the next line looking for the missing apostrophe.
## This works without any errors
data=[('Geo','Elephant',['hay','peanuts']),
('Gerald','Gnu',['leaves','shoots']),
('Leo','Leopard',['meat'])]
for name,familie,feed in data:
print name, familie, feed
Also, the following line does nothing that I can see, and you only use commit() to commit any changes to the database, not after a query.
cursor.execute("""SELECT name,feed FROM animal JOIN food ON animal.id=food.anid WHERE name=%s and feed=%s""",(name,feed))
#
# Do you want "for name,familie,feed in data:" or "for feed in data:"
for name,familie,feed in data:
cursor.execute("""SELECT name,feed FROM animal JOIN food ON animal.id=food.anid WHERE name=%s and feed=%s""",(name,feed))
for feed in data:
P.S. For future reference, if you want some one to assist you with your code, at least try the suggestions before you say that that isn't it, and explain what happens after the change/correction. We will try them, so we know if they are correct or not.