I know there are plenty of titles that sound the same believe me I looked however this has to do with the quotes which make it a string which I have seen very little of and no solutions which worked for me.
I am trying to create a list which i can then put into a database there should normally be a couple hundred items to my list however the problem is the outside quotes turn the entire list into one big element and have had little luck trying to fix it
list with problem
list1 = ['("a"),("b"),("c"),("d"),("e")']
what I need
list1 = [("a"),("b"),("c"),("d"),("e")]
I have tried multiple things so far I have tried...
list1 = ['("a"),("b"),("c"),("d"),("e")']
listFormated = [x.replace("'", '') for x in list1]
instead of removing the outside quote from the list it took all quote marks from inside the string element and removed those instead. for example
list1= ['('a'),('b')('c')("let's")']
now becomes
list1= ['(a),(b),(c),("lets")']
Also Ive tried ast.literal_eval and it almost worked but take a look at the results
from ast import literal_eval
listFormated = [literal_eval(i) for i in list1]
but this returns
[('a','b','c',"let's")]
I would really appreciate any help someone could give.
EDIT:
I have not communicated correctly that I am trying to put bible text into a list in which each line is in a tuple so I can place it into an sqlite db so there wont just be single letters but multiple letters with apostrophes Collins and such and one of the answers were close but it splits each letter into a tuplized list and I need a way to keep the original formatting. Here is my first few lines to give a better example
['(" In the beginning God created the Heauen, and the Earth. "), (" And the ear th was without forme, and voyd, and darkenesse was vpon the face of the deepe: and the Spirit of God mooued vpon the face of the waters. "), (" And God said, Let there be light: and there was light. "), (" And God saw the light, that it was good: and God diuided the light from the darkenesse. ")']