Q:

calling a function while in it

def move(list, wins_1, wins_2):
    global turn
    if turn % 2 == 0:
        sign = "| x "
    else:
        sign = "| o "
y_1 = int(input("Type the value of y: "))
x_1 = int(input("Type the value of x: "))

if list[y_1 - 1][x_1 - 1] == "| x " or list[y_1 - 1][x_1 - 1] == "| o ":
    print("The place is already filled by %s |" % list[y_1 - 1][x_1 - 1])
    move(list, wins_1, wins_2)
else:
    list[y_1 - 1][x_1 - 1] = sign

print_board(list)  #

wins_1, wins_2 = check_winner(sign, wins_1, wins_2)

turn += 1
return wins_1, wins_2

If the user input the [x][y] of a list and its already taken by a x or o (its a tic tac toe game) it should print("this place is already filled") and then make the user type another set of x and y to put his x/o.
That made me think, maybe I could just simply call the function and make it repeat itself. It worked fine, no error. 
But for some reason it printed my board two (or for how many times i have pressed the "x" and "y" for an already filled place) many times.
Can someone explain what happens when you call a function when you are in the function. And what exactly happened in my code?
NOTE: my code is very long this is just a little bit of it. If there is a need for more code, let me know. 
Here is an example of the output: note that it prints the board 2 times after putted the x/o in an already filled place.
Type the name of player 1: 1
type the name of player 2: 1
____________________________________________________________
player_1: 1       X        wins: 0
player_2: 1       O        wins: 0
____________________________________________________________
Type the value of y: 1
Type the value of x: 1
 -------------
 | x |   |   |   
 -------------
 |   |   |   |   
 -------------
 |   |   |   |   
 -------------
____________________________________________________________
player_1: 1       X        wins: 0
player_2: 1       O        wins: 0
____________________________________________________________
Type the value of y: 1
Type the value of x: 1
The place is already filled by | x  |
Type the value of y: 1
Type the value of x: 2
 -------------
 | x | o |   |   
 -------------
 |   |   |   |   
 -------------
 |   |   |   |   
 -------------
 -------------
 | x | o |   |   
 -------------
 |   |   |   |   
 -------------
 |   |   |   |   
 -------------
____________________________________________________________
player_1: 1       X        wins: 0
player_2: 1       O        wins: 0
____________________________________________________________
Type the value of y: 

The whole code:
wins_1 = 0
wins_2 = 0
turn = 0
board = [
        ['|   ', '|   ', '|   ', '|   '],
        ['|   ', '|   ', '|   ', '|   '],
        ['|   ', '|   ', '|   ', '|   ']
    ]
def print_board(board_list):

    for i in range(len(board_list)):
        print(" -------------\n %s" % "".join(board_list[i]))  # .join binder 2 items sammen.
    print(" -------------")

player_1 = input("Type the name of player 1: ")
player_2 = input("type the name of player 2: ")
def game_info(player_1, player_2, wins_1, wins_2):  # prints layout
    print("_" * 60)
    print("player_1: %s       X        wins: %s"
          "\nplayer_2: %s       O        wins: %s"
          % (str(player_1), str(wins_1), str(player_2), str(wins_2)))
   print("_" * 60)
# ovenstående viser output af wins og navn

def print_winner(sign, wins_1, wins_2):

    if sign == "| x ":
        print("%s got 3 in a row, %s wins!" % (player_1, player_1))
        wins_1 += 1
    else:
        print("%s got 3 in a row, %s wins!" % (player_2, player_2))
        wins_2 += 1
    return wins_1, wins_2

def check_winner(sign, wins_1, wins_2):

    # check vertical:    |
    for x in range(0,3):
        if board[0][x] == sign and board[1][x] == sign and board[2][x] == sign:
            wins_1, wins_2 = print_winner(sign, wins_1, wins_2)

    #  check horizontal: -
    for x in range(0, 3):
        if board[x][0] == sign and board[x][1] == sign and board[x][2] == sign:
            wins_1, wins_2 = print_winner(sign, wins_1, wins_2)

    #  check diagonal:   \
    if board[0][0] == sign and board[1][1] == sign and board[2][2] == sign:
        wins_1, wins_2 = print_winner(sign, wins_1, wins_2)
    elif board[0][2] == sign and board[1][1] == sign and board[2][0] == sign:
        wins_1, wins_2 = print_winner(sign, wins_1, wins_2)

    return wins_1, wins_2

def move(list, wins_1, wins_2):
    global turn
    if turn % 2 == 0:
        sign = "| x "
    else:
        sign = "| o "

    y_1 = int(input("Type the value of y: "))
    x_1 = int(input("Type the value of x: "))

    if list[y_1 - 1][x_1 - 1] == "| x " or list[y_1 - 1][x_1 - 1] == "| o ":
        print("The place is already filled by %s |" % list[y_1 - 1][x_1 - 1])
        move(list, wins_1, wins_2)
    else:
        list[y_1 - 1][x_1 - 1] = sign

    print_board(list)  #

    wins_1, wins_2 = check_winner(sign, wins_1, wins_2)

    turn += 1
    return wins_1, wins_2

while True:
    game_info(player_1, player_2, wins_1, wins_2)
    wins_1, wins_2 = move(board, wins_1, wins_2)  # move() sætter et 'tegn' og returner win1/win2

    if wins_1 or wins_2 == 1:
        break
print("*****************************************************\nGame Over.    \n IT WORKED!")

A:

Here is the answer:
def move(list, wins_1, wins_2):
    printed = False
    global turn
    if turn % 2 == 0:
        sign = "| x "
    else:
        sign = "| o "

    y_1 = int(input("Type the value of y: "))
    x_1 = int(input("Type the value of x: "))

    if list[y_1 - 1][x_1 - 1] == "| x " or list[y_1 - 1][x_1 - 1] == "| o ":
        print("The place is already filled by %s |" % list[y_1 - 1][x_1 - 1])
        move(list, wins_1, wins_2)
        printed = True
    else:
        list[y_1 - 1][x_1 - 1] = sign

    if printed == False:
        print_board(list)  

    wins_1, wins_2 = check_winner(sign, wins_1, wins_2)

    turn += 1
    return wins_1, wins_2

I have added a variable called printed so it only prints once
This then allows your program only to print if it hasn't printed already
Hope this has helped :)

