D
D
DavidDavidrrrr2021-06-20 16:02:54
Python
DavidDavidrrrr, 2021-06-20 16:02:54

How to make one from several lists?

From here
[1837769803, 'Tt']
[1837765893, 'Tp']
[1837765803, 'ot']
[1837465803, 'g']
To here


ID=[1837769803,1837765893,1837765803,1837465803]T
, name= ot,g]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mikeyuri, 2021-06-20
@mikeyuri

Something like this is possible:

id, name = map(list, zip([1837769803, 'Tt'], [1837765893, 'Tp'], [1837765803, 'ot'], [1837465803, 'g']))
print(id, name)

zip function

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question