Reputation: 1265
I have two lists:
ask[]
timeStamp[]
I need to add the information in these lists into a two dimensional array.
Here is my code:
for item in actTime:
rawData.append(ask[x],timeStamp[x])
x = x + 1
Upvotes: 0
Views: 746
Reputation: 49085
Use zip
:
>>> pairs = zip(ask, timeStamp)
This will return a list of (tuple) pairs.
Upvotes: 4