input: def Matrix_Operations(m: int, n: int, lst: List[List[int]], operation: str) -> str:
      """Given dimensions m and n, and a list of lists representing a matrix, perform 
      the specified matrix operation and return the resulting matrix. The operations can be:
      'add', 'sub', 'mul', and 'transpose'.
      >>> Matrix_Operations(2, 2, [[1, 2], [3, 4]], 'add')
      '1 2 \\n3 4'
      >>> Matrix_Operations(3, 3, [[1, 2, 3], [4, 5, 6], [7, 8, 9]], 'transpose')
      '1 4 7 \\n2 5 8 \\n3 6 9'
      >>> Matrix_Operations(2, 2, [[1, 2], [3, 4]], 'mul')
      '7 10 \\n15 22'
      """
output:     if operation == 'add':
          result = [[lst[i][j] for j in range(n)] for i in range(m)]
      elif operation == 'sub':
          result = [[lst[i][j] for j in range(n)] for i in range(m)]
      elif operation == 'mul':
          result = [[0 for j in range(m)] for i in range(m)]
          for i in range(m):
              for j in range(m):
                  for k in range(n):
                      result[i][j] += lst[i][k] * lst[k][j]
      elif operation == 'transpose':
          result = [[lst[j][i] for j in range(m)] for i in range(n)]
      else:
          return "Invalid operation"
      
      return '\n'.join(' '.join(map(str, row)) for row in result)