2014-11-07 47 views
2

我正在寻找在机器人框架级别上实现Python str.join函数,我不确定正确的语法。我也显示代码的样子在Python(工作)在机器人框架内使用'str.join'语法

我已经试过这样:

机器人:

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

代码在Python:

P = ['a', 'h', 'b', 'a', 'f', 'h', 'l'] 
print ','.join(P) 

回答

5

使用BuiltIn的Catenate

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

而且,你是不是创造了你的问题的列表。它应该看起来更像这样:

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