Printing output
print takes any number of values, turns each one into text with str, and writes them with a space between and a newline at the end. Two keyword arguments change that.
print("a", 1, True) # a 1 True
print("a", "b", sep="-") # a-b
print("same", end="")
print(" line") # same line
nums = [1, 2, 3]
print(*nums, sep=", ") # 1, 2, 3
print() # empty linesepgoes between the values. The default is one space.endgoes after the last value. The default is"\n", a newline.*numsspreads a list into separate arguments, so each item is printed on its own terms.
Printing is not returning
print shows text to a person and gives back None. A function that works something out should usually return the result and let the caller decide whether to print it. Code that only prints is hard to reuse and hard to test.
Your task
Write print_row(values) that prints the values on one line separated by " | ". Write print_list(words) that prints the words on one line separated by ", ", ending with ".\n" instead of a plain newline.
The explanation opens here once every check passes.