parameters: (matrix)
return_statement: return result
docstring: Transpose a list of lists.
  
      >>> transpose([['a', 'b', 'c'], ['d', 'e', 'f'], ['g', 'h', 'i']])
      [['a', 'd', 'g'], ['b', 'e', 'h'], ['c', 'f', 'i']]
  
      >>> transpose([['a', 'b', 'c'], ['d', 'e', 'f']])
      [['a', 'd'], ['b', 'e'], ['c', 'f']]
  
      >>> transpose([['a', 'b'], ['d', 'e'], ['g', 'h']])
      [['a', 'd', 'g'], ['b', 'e', 'h']]
docstring_summary: Transpose a list of lists.
docstring_tokens: Transpose a list of lists .
function: def transpose(matrix):
      """Transpose a list of lists.
  
      >>> transpose([['a', 'b', 'c'], ['d', 'e', 'f'], ['g', 'h', 'i']])
      [['a', 'd', 'g'], ['b', 'e', 'h'], ['c', 'f', 'i']]
  
      >>> transpose([['a', 'b', 'c'], ['d', 'e', 'f']])
      [['a', 'd'], ['b', 'e'], ['c', 'f']]
  
      >>> transpose([['a', 'b'], ['d', 'e'], ['g', 'h']])
      [['a', 'd', 'g'], ['b', 'e', 'h']]
  
      """
      result = zip(*matrix)
      # Convert list of tuples to list of lists.
      # map is faster than a list comprehension since it is being used with
      # a built-in function as an argument.
      result = map(list, result)
      return result
function_tokens: def transpose ( matrix ) : result = zip ( * matrix ) # Convert list of tuples to list of lists. # map is faster than a list comprehension since it is being used with # a built-in function as an argument. result = map ( list , result ) return result