<prompt> Kuandika programu ya format maalum matrix na orodha ya majina ya safu, katika meza katika pato console.  <response>: Heres an example Python code snippet that formats a matrix and a list of column names into a table in console output:def print_tablematrix, column_names: Determine the maximum width of each column based on the length of the column names column_widths maxlenstrname, maxlenstrrowi for row in matrix for i, name in enumeratecolumn_names Print the column headers header .joinname.centerwidth for name, width in zipcolumn_names, column_widths separator - --.join- width for width in column_widths - printseparator printheader printseparator Print each row of the matrix for row in matrix: row_str .joinstrval.ljustwidth for val, width in ziprow, column_widths printrow_str Print the footer separator printseparatorTo use this function, you can pass in your matrix a list of lists and a list of column names:pythonmatrix 1, 2, 3, 4, 5, 6, 7, 8, 9column_names A, B, Cprint_tablematrix, column_namesThis would print the following table:--------- A B C --------- 1 2 3 4 5 6 7 8 9 --------- 