Reputation:
What is the shortest way to initiate nested lists with some values in Robot Framework?
Something like:
myList = new List (new List (1, 2 , 3), new List (a, b, c))
Upvotes: 1
Views: 1743
Reputation: 386220
You can use the Evaluate keyword. You can then use normal python syntax to define the list.
*** Test Cases ***
Example
${myList}= Evaluate [[1,2,3], ['a', 'b', 'c']]
should be equal ${myList[1][2]} c
Upvotes: 3