Dannno had your answer in the comments.
You can do this with:
bar.append([idcursor.CurrentValue, durationcursor.CurrentValue, ...])
note the use of []
. This is different from
bar.append(idcursor.CurrentValue, durationcursor.CurrentValue, ...)
as using []
creates an array that contains all the values and appends that array to bar
; whereas without []
will attempt to pass each value as a separate parameter to bar.append()
, which doesn't work as you discovered.
You also mentioned that you tried:
bar.append(idcursor.CurrentValue)
bar.append(durationcursor.CurrentValue)
...
This will give you a one dimensional array that contains all your values. Since you said you wanted a multi-dimensional array, this won't work for you.