I have a function that returns a message as a string as follows:
l = ['["sure","kkk"]', '["sure","ii"]']
I have tried to remove the "'"
character through an iteration but its not working for me.
This is my code:
print([item.replace('\'["','"').replace('"]\'','"') for item in l])
Is there a better way to do this since I want the results as this:
l = [["sure","kkk"], ["sure","ii"]]