What I am trying to do is extracting zeroth element in a list and first element in another list of the given 2 dimensional list.
baseball = [[180, 78.4],
x = [ a for a in baseball ]
y = [ a for a in baseball ]
Assuming it's rectangular (ie. the length of the inner lists is consistent), you can implement the following:
def transpose(matrix): return [[matrix[j][i] for j in range(len(matrix))] for i in range(len(matrix))]
Then, your problem is just a call to transpose (
x, y = transpose(baseball)).