Multiplication tables: Difference between revisions
Content added Content deleted
(→{{header|Python}}: Labelled the procedural and functional variants) |
m (→Functional Python: Minor reformat to ease the comparison of list comprehension with list monad) |
||
Line 4,160: | Line 4,160: | ||
return unlines([ |
return unlines([ |
||
pad(str(y) + ':') + unwords([ |
pad(str(y) + ':') + unwords([ |
||
pad(str(x * y) if x >= y else '') |
pad(str(x * y) if x >= y else '') |
||
for x in xs |
|||
]) for y in xs |
]) for y in xs |
||
]) |
]) |