Combine lists by joining strings with matching index values

后端 未结 5 1761
闹比i
闹比i 2021-01-06 11:50

I have two lists that I would like to combine, but instead of increasing the number of items in the list, I\'d actually like to join the items that have a matching index. Fo

5条回答
  •  萌比男神i
    2021-01-06 12:15

    To add to the variety (Python 2.7)

    List3 = ['{}{}'.format(x, y) for x, y in  zip(List1, List2)]
    

提交回复
热议问题