在机器人框架中使用'str.join'语法

use*_*369 2 python join robotframework

我想str.join在机器人框架级别实现Python 函数,我不确定正确的语法.我还展示了Python中代码的样子(有效)

我试过这个:

机器人:

Set Suite Variable  @{list} ['a', 'h', 'b', 'a', 'f', 'h', 'l']
Log @{','.join(list)}   
Run Code Online (Sandbox Code Playgroud)

Python中的代码:

P = ['a', 'h', 'b', 'a', 'f', 'h', 'l']
print ','.join(P)
Run Code Online (Sandbox Code Playgroud)

omb*_*e42 5

使用内建的链状.

${my string}= Catenate SEPARATOR=, @{list}

此外,您不是在问题中创建列表.它应该看起来更像这样:

@{list}= Create List a h b a f h l