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
目前没有回答
相关问题 更多 >
编程相关推荐