Question: Specification: You are to put the code for the function printTable () into the file tableprinter.py The function printTable (L) that takes a list L

 Specification: You are to put the code for the function printTable

Specification: You are to put the code for the function printTable () into the file tableprinter.py The function printTable (L) that takes a list L of lists of strings and displays it in a well organized table with each column right-justified. Assume that all the inner lists will contain the same number of strings. Given tableData = [ [ ' apples ' , ' oranges ' , ' cherries' , ' banana ' ] , [ 'AliceBob', "Carol', 'David'], [ 'dogs', "cats', "moose goose' 11 the function should print the following: apples Alice dogs oranges Bob cats cherries Carol moose banana David goose Hint: Your code will first have to find the longest string in each of the inner lists so that the whole column can be wide enough to fit all the strings. You can store the maximum width of each column as a list of integers. These widths will be used with the string method rjust to attain the desired alignment

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!