I need to convert string like below to list using Python.
sample_str = '["sample text1", "\'sample text2\'", "sample text3"]'
If we check the data type of "sample_str" above, it will be string. I need to know if there a way I could make it a list like below :
sample_str_to_list = ["sample text1", "\'sample text2\'", "sample text3"]
If we check the data type of "sample_str_to_list" above, it will be list.
I have tried to do it using string slicing, but it did not help. Can somebody please help here. Thank in advance.