def winningcheck(board):
winning == ''
if board[1] == board[2] == board[3]:
print('The game has been won')
winning == 'True'
else:
print('The game has not been won')
test = ['#', 'X ', 'X ', 'X ', ' ', ' ', ' ', ' ', ' ', ' ']
winningcheck(test)
print(winning)
I'm a beginner, but I expected the variable winning to be reassigned to 'true' when the 'if' condition was met. However, it just returns an empty string instead when I try to print the variable.