Answer the question
In order to leave comments, you need to log in
[[+content_image]]
How to merge lists in Python?
there are several lists, for example:
a = ['Petr','Ivan','Sydor']
b = ['Petrov','Ivanov','Sydorov']
c = ['23','24','25']
x = [['Petr','Petrov','23'],['Ivan','Ivanov','24'],['Sydor','Sydorov','25']]
Answer the question
In order to leave comments, you need to log in
zip(a, b, c)
[list(l) for l in zip(a, b, c)] #если нужны именно листы внутри
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question