List to String to List Python 3
问题 I need to convert a list into a string and then do the reverse process. Note that one script will convert List->String and another script will convert String->List, so store the list in a variable is not a solution. Use split(', ') or similar is not a solution either in all cases. So, as a challange I invite you to do the conversion in the following example: l = ['ab,.cd\'ac"', b'\x80', '\r\nHi, !', b'\x01'] str_l = str(l) I have tried one thing that worked: using exec() built-in function but