Write a function ```x(n)``` that takes in a number ```n``` and returns an ```nxn``` array with an ```X``` in the middle. The ```X``` will be represented by ```1's``` and the rest will be ```0's```. 
E.g.
```python
x(5) ==  [[1, 0, 0, 0, 1],
          [0, 1, 0, 1, 0],
          [0, 0, 1, 0, 0],
          [0, 1, 0, 1, 0],
          [1, 0, 0, 0, 1]];
          
x(6) ==  [[1, 0, 0, 0, 0, 1],
          [0, 1, 0, 0, 1, 0],
          [0, 0, 1, 1, 0, 0],
          [0, 0, 1, 1, 0, 0],
          [0, 1, 0, 0, 1, 0],
          [1, 0, 0, 0, 0, 1]];
```

Source: codewars | Difficulty: EASY
Tags: Data structures

Starter code: def x(n):
	

Solutions:
def x(n):
	d = [[0] * n for i in range(n)]
	for i in range(n):
		d[i][i] = 1
		d[i][-i - 1] = 1
	return d


def fill(i, j, n):
	if i == j or i + j == n - 1:
		return 1
	else:
		return 0

def x(n):
	return [[fill(i, j, n) for j in range(n)] for i in range(n)]


x = lambda n: [[int(i == j or i == n - j - 1) for i in range(n)] for j in range(n)]


x = lambda n: [[1 if y == x or y == n - x - 1 else 0 for y in range(n)] for x in range(n)]


def x(n):
	zarr = [[0 for _ in range(n)] for _ in range(n)]
	for i in range(n):
		zarr[i][i] = 1
		zarr[i][-(i + 1)] = 1
	return zarr


def x(n):
	result = [[0] * n for _ in range(n)]
	for i in range(n):
		result[i][i] = result[i][-i - 1] = 1
	return result


x = lambda n: [[int(c == r or c == n - r - 1) for c in range(n)] for r in range(n)]


def x(n):
	return [[int(i == j or i + j == n - 1) for j in range(n)] for i in range(n)]