# Author: James Tam # Veersion: November 21, 2022 # Learning objective: creating a variable sized 2D list using 2 calls to # 'append': # 1) First append adds an empty row to the list (line 13) # 2) Second append adds sucessive elements to the newly created row (line 16) aGrid = [] noRows = int(input("Number rows: ")) noColumns = int(input("Number columns: ")) #Create list for r in range (0,noRows,1): aGrid.append ([]) for c in range (0,noColumns,1): aGrid[r].append("*") #Display list for r in range (0,noRows,1): for c in range (0,noColumns,1): print(aGrid[r][c], end="") print()