Write a program that using a list of lists of characters, printsthe following grid:
- x o x o
- o x o x
- x o o x
- o x x o
An inner list could look like this: [‘x’,’o’,’x’,’o’].
The inner list has to look like that ^.
Input Format
none
Constraints
none
Output Format
a grid
Solution
#This is a python codelst = []for i in range(4): temp = [] for j in range(4): if((i+j)%2==0): temp.append(‘x’) else:
OR
OR