Total beginner Tic Tac Toe game in Python
Here are my notes:

your printBoard function has code repetition, you can see there is a pattern 0 1 2, 3 4 5, 6 7 8, so  you can do a for loop, example:

for i in range(3):
  print (board[i * 3] + '|' + board[i * 3 + 1] + '|' + board[i * 3 + 2])


your legalMoves list is not required, because it's just numbers from 1 to 9, so you can check against that example: if n &gt;= 1 and n &lt;= 9: #accepted

"move = int(input('Pick a number 1-9:'))", you need to check for the input first if it can be converted to int or not to prevent the user from breaking your program if non int string value was typed, and to do that you can store the input in a string then check against it to be an int or not example:

def isInt(strInt):
  for c in strInt:
    if c not in "0123456789": return False
  return True

n = input()
if isInt(n): move = int(n)


and your checks inside the while loop can be shortened to using for loop instead, you can see a pattern in those cells positions, so if you want to check horizontally, yoou need to do, example:

for i in range(3):
  if board[i * 3] == board[i * 3 + 1] == board[i * 3 + 2] and board[i * 3] != "-":
    # do something


and vertically

for i in range(3):
  if board[i] == board[i + 3] == board[i + 6] and board[i] != "-":
    # do something


and diagonally

  if (board[0] == board[4] == board[8] or board[2] == board[4] == board[6]) and board[4] != "-":


without checking for "X" or "O", you just need to check for "-"

you need also to prevent the user from overwriting an already filled cell, example

if board[move - 1] != "-":
  print("Pls choose an empty cell")


you need also to check for tie, because not all time you get a winner example if your main loop I mean the one for each user correct move which are 9 moves, if it reaches the end and there is no winner then it's a tie, and you should let the user know.

That's it, you can improve your code now, I hope you like my feedBack, also I have written a full solution, you can find it in your question in Stack Overflow, and if you have any question, I will be happy to answer.