# Task
 Given a rectangular matrix containing only digits, calculate the number of different `2 × 2` squares in it.
# Example
 For
```
matrix = [[1, 2, 1],
          [2, 2, 2],
          [2, 2, 2],
          [1, 2, 3],
          [2, 2, 1]]
```
the output should be `6`.
 Here are all 6 different 2 × 2 squares:
 ```
 1 2
 2 2
 2 1
 2 2
 2 2
 2 2
 2 2
 1 2
 2 2
 2 3
 2 3
 2 1
 ```
# Input/Output
 - `[input]` 2D integer array `matrix`
    Constraints: 
    `1 ≤ matrix.length ≤ 100,`
    `1 ≤ matrix[i].length ≤ 100,`
    `0 ≤ matrix[i][j] ≤ 9.`
 - `[output]` an integer
    The number of different `2 × 2` squares in matrix.
def different_squares(matrix):
    result = []
    for i in range(len(matrix) - 1):
        for j in range(len(matrix[0]) - 1):
            one = [
                matrix[i][j:j + 2],
                matrix[i + 1][j:j + 2]
            ]
            if one not in result:
                result.append(one)
    return len(result)

def different_squares(matrix):
    result = []
    for i in range(len(matrix) - 1):
        for j in range(len(matrix[0]) - 1):
            one = [
                matrix[i][j:j + 2],
                matrix[i + 1][j:j + 2]
            ]
            if one not in result:
                result.append(one)
    return len(result)
