EMPTY = 0 PL1 = 1 PL2 = 2 tafel = [ [EMPTY, EMPTY, EMPTY], [EMPTY, EMPTY, EMPTY], [EMPTY, EMPTY, EMPTY], ] def print_tafel(tafel): symbols = ("*", "X", "O") for zeile in tafel: for c in zeile: print(f"{symbols[c]} ",end="") print() def input_ok(tafel, r, c): return True def user_input(user,tafel): print(f"Spieler {user} ist dran") print("Geben Sie die Zeile und Spalten ein") r = int(input("Zeile: ")) - 1 c = int(input("Spalte: ")) - 1 if input_ok(tafel, r, c): tafel[r][c] = user else: print("Eingabe nicht in Ordnung") print_tafel(tafel) user_input(1, tafel) print_tafel(tafel) user_input(2, tafel) print_tafel(tafel)