Question: So, I'm trying to create a function that will take in a list of lists, each consisting of 9 integers numbered 1 through 9, and return a Boolean if it is a valid solution to for a Sudoku. Right now, I've managed to solve part of the problem with checking for rows and columns, but I am stuck on the implementation of checking the three by three boxes. Here's my code so far.

```
alist = [1,2,3,4,5,6,7,8,9]

def checkSudoku(grid):
    a = grid
    b = grid
    c = grid
    d = False
    e = False
    f = False
    newlist = []
    for i in a:
        i.sort()
        if i == alist:
            d = True
        else:
            d = False
            break
    for j in range(9):
        for k in b:
            newlist.append(k)

        newlist.sort()
        if i == alist:
            e = True
            newlist = []
        else:
            e = False
            break

    if d == True and e == True:
        return True
    else:
        return False

```

Basically, My was to test all three factors necessary for it to be true, then return True if all three are True, else return false. Any help?

Answer: 
Probably best to keep the gui separate from the logic:

```
public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
    }

    private void button1_Click(object sender, EventArgs e)
    {
        Authenticator at = new Authenticator();
        if (at.validate(textBox1.Text)) {
            ListBox.Items.Add("Valid");
        }
    }
}

public class Authenticator
{
    private int num;

    public bool validate(string s)
    {
        if (s == num.ToString())
        {
             return true;
        }
        return false;
    }
}

```
Sorry I can't comment on your post, I don't have enough reputation.

I've had similar trouble once before getting a form to access a string from another form.

In my case I just had to make the string static. Try doing the same with your textbox.

```
public static TextBox textBox1;
public Form1()

```