-1

I have tried to search for the answer but I can't find it.

I have two lists. Both lists have 71 items.

I want every index in both lists to be combined.

Pika Supports Ukraine
  • 3,612
  • 10
  • 26
  • 42
mafon
  • 3
  • 1
  • 1
    https://stackoverflow.com/questions/13704860/zip-lists-in-python – jgoday Mar 17 '19 at 15:43
  • Please include relevant code in the question as text rather than as images so that others can view it more easily and copy and paste if necessary. – Henry Woody Mar 17 '19 at 17:13

1 Answers1

0

You could do something like this:

extensions =['.sp1', '.sp1', '.sp2']
my_numbers =[4, 16, 128]
new_list = []

for x in range(len(my_numbers)):
    new_list.append("".join([str(my_numbers[x]), extensions[x]]))

print(new_list)

Output:

['4.sp1', '16.sp1', '128.sp2']
NoSplitSherlock
  • 605
  • 4
  • 19