MATLAB Examples

Use Python List as Values in for Loop

This example shows how to display elements of a Python® list.

li = py.list({1,2,3,4});
for n = li
    disp(n{1})
end
     1

     2

     3

     4