RosettaCodeData/Task/Loops-Foreach/MATLAB/loops-foreach-2.m

5 lines
143 B
Mathematica
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
list2 = {'AA','BB','CC'};
for k = list2, % list2 must be a row vector (i.e. array of size 1xn)
printf('%s\n',k{1})
end;