Untitled
Anonymous
python
08/09/2023 10:42 AM
248 B
17
Indexable
import ast
def convert_text_to_list(text):
try:
return ast.literal_eval(text)
except ValueError:
print("Error in converting the given text.")
return []Editor is loading...