Trying to make a maze
11:01 05 Mar 2017

Hi I am learning Python from the week, and I got the idea to make maze in python. After a long time trying to do this, I always came to this starting point:

enter image description here

I would like to get the effect of what is on the 2 selection

My code:

def make(x):
    if x%2 !=0:
        return False
    else:
        table = []
        for i in range(0,x):
            if i == 0:
                table.append([0]*x)
            elif i == x-1:
                table.append([0]*x)
                return table
            else:
                if i == 1:
                    table.append([0])
                    table[i].extend([1]*(x-2))
                    table[i].extend([0])
                elif i==x-2:
                    table.append([0])
                    table[i].extend([1]*(x-2))
                    table[i].extend([0])
                else:
                    table.append([0]*(x))       

for j in make(20):
    print j
python