# Author: James Tam # Version: October 30, 2022 # Learning: # 1) Create a 2D list using the repetition operator # 2) Each element is the same MAX_COLUMNS = 5 MAX_ROWS = 3 ELEMENT = "*" aList = [] r = 0 while (r < MAX_ROWS): tempList = [ELEMENT] * MAX_COLUMNS aList.append(tempList) r = r + 1 r = 0 while (r < MAX_ROWS): c = 0 while (c < MAX_COLUMNS): #Keep all row elements on same line print(aList[r][c], end = "") c = c + 1 #Displayed whole row, move output to a new line print() r = r + 1