# Author: James Tam # Version: October, 2024 # Learning objectives: # 1) Creating a variable sized 2D list using the repetition operator and the append method. # 2) The 2D list is created by creating a 1D list and appending the 1D list to the end of the 2D list. 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): print(aList[r]) r = r + 1