Padovan n-step number sequences: Difference between revisions
m
→Python: Functional: Supplied a missing docstring.
m (→Python: Functional: Supplied a missing docstring.) |
|||
Line 1,162:
# spacedTable :: [[String]] -> String
def spacedTable(rows):
'''A table with right-aligned columns.
'''
columnWidths = [
max([len(x) for x in col])
for col in zip(*rows)
]
return '\n'.join(
' '.join(
map(
Line 1,174 ⟶ 1,176:
)
for row in rows
# MAIN ---
if __name__ == '__main__':
main()
</lang>
{{Out}}
<pre>Padovan n-step series:
|