Untitled
import ast def convert_text_to_list(text): try: return ast.literal_eval(text) except ValueError: print("Error in converting the given text.") return []
import ast def convert_text_to_list(text): try: return ast.literal_eval(text) except ValueError: print("Error in converting the given text.") return []