Fix Python – Why is using ‘eval’ a bad practice?

I use the following class to easily store data of my songs.
class Song:
“””The class to store the details of each song”””
attsToStore=(‘Name’, ‘Artist’, ‘Album’, ‘Genre’, ‘Location’)
def __init__(self):
for att in self.attsToStore:
exec ‘self.%s=None’%(att.lower()) in locals()
def setDetail(self, key, val):

Fix Python – Using python’s eval() vs. ast.literal_eval()

I have a situation with some code where eval() came up as a possible solution. Now I have never had to use eval() before but, I have come across plenty of information about the potential danger it can cause. That said, I’m very wary about using it.
My situation is that I have input being given by a user:
datamap = input(‘Provide some data here: ….