I know i can iterate over an array and append the values at each index to my 4 array variables, but is there a quicker, less coding way to do this? I am wonder if i can do something like this (which obviously doesn't work):
tupleOfArrays = ([['s1',2,3],
['s2',3,4],
['s5',6,7]])
arr1, arr2, arr3 = [(a[0],a[1],a[2]) for a in tupleOfArrays]
at the end of this, the three arrays should contain:
arr1=['s1',2,5]
arr2=['s2',3,6]
arr3=['s3',4,7]
Edited: i've edited this to reflect what my structure 'truly' looks like so that the selected answer makes more sense. that i have is an tuple containing an list of list. first element of the inner list are strings.
Thanks much