I've the following two arrays:
array = [[[0, 1], ['foo', 'moo'], ['17-03-2014', '17-03-2014'], ['17-03-2014', '17-03-2014'], ['12:02', '12:02'], ['12:07', '12:07'], [123, 123], [1, 1], [0, 0], [0.22991937398910522, 0.45983871817588806]], [[2, 3], ['bar', 'les'], ['18-03-2014', '18-03-2014'], ['21-03-2014', '21-03-2014'], ['12:03', '12:03'], ['12:03', '12:03'], [123, 123], [1, 1], [0, 0], [0.22991937398910522, 0.45983871817588806]]]
type = ['type one', 'type two']
array contains two arrays inside it:
1. [[0, 1], ['foo', 'moo'], ['17-03-2014', '17-03-2014'], ['17-03-2014', '17-03-2014'], ['12:02', '12:02'], ['12:07', '12:07'], [123, 123], [1, 1], [0, 0], [0.22991937398910522, 0.45983871817588806]]
2. [[2, 3], ['bar', 'les'], ['18-03-2014', '18-03-2014'], ['21-03-2014', '21-03-2014'], ['12:03', '12:03'], ['12:03', '12:03'], [123, 123], [1, 1], [0, 0], [0.22991937398910522, 0.45983871817588806]]
How can I print the arrays as to show the following solutions?
type one
the first column of array[0]
the second column of array[0]
type two
the first column of array[1]
the second column of array[1]
The output I would like to have is to get each value to I can do other stuff with it. This means, I would like to store for the first column of the array:
piece='foo'
date_in=17-03-2014
date_out=17-03-2014
time_int=12:02
time_out=12:07
num=123
op=1
urg=0
worked_time=0.22991937398910522
What I've tried so far:
for i in xrange(len(type)):
print type[i]
for m in xrange(len(array[i])):
print '\t' + str(array[i][m])
thanks in advance