Feb-22-2022, 07:50 PM
(Feb-22-2022, 06:56 PM)BashBedlam Wrote: One reason for not using one and two letter variable names is that things likemat
can be confusing. Descriptive variable names make the code much clearer and easier to work with and understand.
M = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]] def column (matrix, column_number) : output_column = [] for row in matrix : output_column.append (row [column_number]) return output_column duly noted, thank you ! print (column (M, 1))