Don't know how to solve the syntax error


#1

def printExtendedBasePattern(n, 'o', '-'):

pattern = []

for index in range(n):
    pattern.append(n * ['-'])

for line in range(n):
    pattern[line][line] = 'o'
    pattern[line][len(pattern) - 1 - line] = 'o'

for row in pattern:
    print (' '.join(row))

print(printBasePattern(6, 'o', '-'))

Based on the battleship code, I write a new code. This is my code, whenever I want to run it, it always says that there is an invalid syntax error in the parameter part.


#2

What is the goal of this line? Please explain your reasoning. Thank you.