list_one = [<Cell R1C1 'Hello'>, <Cell R1C2 'Name'>]
我有一个API函数调用,可以在python中理解此类数据。
my_api_function(list = [<Cell R1C1 'Hello'>, <Cell R1C2 'Name'>])
但是python不会接受此列表,因为列表定义不正确。
我如何将列表写为字符串,并仍然将其传递给上面编写的函数?
预期结果
#SUDO CODE
list_one = ["<Cell R1C1 'Hello'>, <Cell R1C2 'Name'>"]
list_one = list_one.convert_to_text # your solution comes here
# Such that my_api_function passes as
my_api_function(list = [<Cell R1C1 'Hello'>, <Cell R1C2 'Name'>])
#as oppose to
my_api_function(list = ["<Cell R1C1 'Hello'>, <Cell R1C2 'Name'>]")
# Note that removing the quotes is my major issue