Multiplication tables: Difference between revisions

→‎{{header|Python}}: Slight reduction of one expression
(→‎{{header|Python}}: Generalised column alignment for tables of other orders)
(→‎{{header|Python}}: Slight reduction of one expression)
Line 4,151:
return unlines([
pad(str(y) + ':') + unwords([
pad(str(x * y)) if x >= y else '') for x in xs
else pad('') for x in xs
]) for y in xs
])
9,659

edits