Lets say i have one list a and a list of lists b:
a = ['1','2','3']
b = [['Hello'],['I'],['am']]
How could i go about getting the following output?
b = [['Hello','1'],['I','2'],['am','3']]
I have tried various things unsuccesfully like the following.
for i in a:
for j in range(b):
j.append(i[j])
print(b)
EDIT: I was looking for a way to do this, in case the two lists is not of the same length, which the duplicate does not answer. If you look in the comments on the accepted answer, you will fin the solution though.