Untitled
unknown
python
2 years ago
713 B
4
Indexable
i=0 plansza = ['295743861',\ '431865927',\ '876192543',\ '387459216',\ '612387495',\ '549216738',\ '763524189',\ '928671354',\ '154938672'] """while i < 9: row = input("Podaj "+ str(i+1) +" rząd: ") if not row.isdigit() or len(row) != 9: print("To nie rzad sudoku!") continue plansza.append(row) i += 1""" dic_szablon = {} for i in range(1,10): dic_szablon[i] = 1 def check_first(dic): dic_temp = {} for item in plansza: for char in item: dic_temp[int(char)] = item.count(char) if dic_temp == dic: dic_temp.clear() continue else: return False return True
Editor is loading...