Collect and sort square numbers in ascending order from three lists: Difference between revisions
Content added Content deleted
m (→{{header|Phix}}: unique() comment) |
m (→{{header|Phix}}: anywhere/6 ways) |
||
Line 230: | Line 230: | ||
Added:690, Sorted:{4,9,16,25,36,36,49,81,121,144,169} |
Added:690, Sorted:{4,9,16,25,36,36,49,81,121,144,169} |
||
</pre> |
</pre> |
||
You could also apply res:=unique(res), which would reduce the length by 1 (the duplicate 36) and yield a total of 654. |
You could also apply res:=unique(res), anywhere/6 ways: new line in 3 places, or inline on either existing assignment, or as a replacement for the sort(), which would reduce the length by 1 (the duplicate 36) and yield a total of 654. |
||
=={{header|Python}}== |
=={{header|Python}}== |