von A1 - I9 hat jedes Feld einen bestimmten Wert. Manche Felder haben Anfangs ja noch mehrere Möglichkeiten. Nehmen wir an A1 wäre 3 dann könnte kein weiteres Feld in der Reihe A und Spalte 1 sowie das obere linke Rechteck mehr den Wert 3 enthalten. Diesen Wert wollte ich aus den restlichen values löschen.
Das ganze sollte natürlich geprüft werden und nur falls len(dict.values()) == 1 stattfinden.
Code: Alles auswählen
{'I6': '123456789', 'H9': '123456789', 'I2': '123456789', 'E8': '123456789', 'H3': '123456789', 'H7': '123456789', 'I7': '123456789', 'I4': '123456789', 'H5': '1', 'F9': '123456789', 'G7': '123456789', 'G6': '123456789', 'G5': '123456789', 'E1': '123456789', 'G3': '123456789', 'G2': '123456789', 'G1': '6', 'I1': '7', 'C8': '123456789', 'I3': '123456789', 'E5': '123456789', 'I5': '3', 'C9': '123456789', 'G9': '123456789', 'G8': '2', 'A1': '123456789', 'A3': '123456789', 'A2': '123456789', 'A5': '123456789', 'A4': '123456789', 'A7': '4', 'A6': '123456789', 'C3': '123456789', 'C2': '123456789', 'C1': '123456789', 'E6': '123456789', 'C7': '123456789', 'C6': '7', 'C5': '123456789', 'C4': '6', 'I9': '123456789', 'D8': '6', 'I8': '123456789', 'E4': '123456789', 'D9': '123456789', 'H8': '123456789', 'F6': '123456789', 'A9': '1', 'G4': '123456789', 'A8': '123456789', 'E7': '3', 'E3': '123456789', 'F1': '123456789', 'F2': '1', 'F3': '123456789', 'F4': '123456789', 'F5': '123456789', 'E2': '4', 'F7': '123456789', 'F8': '123456789', 'D2': '123456789', 'H1': '123456789', 'H6': '123456789', 'H2': '5', 'H4': '123456789', 'D3': '123456789', 'B4': '2', 'B5': '123456789', 'B6': '123456789', 'B7': '123456789', 'E9': '123456789', 'B1': '8', 'B2': '123456789', 'B3': '123456789', 'D6': '123456789', 'D7': '123456789', 'D4': '8', 'D5': '123456789', 'B8': '123456789', 'B9': '123456789', 'D1': '123456789'}