Questions about setting up Python Dictionary!

Asked 1 years ago, Updated 1 years ago, 122 views

name = [Gayeon, Nayeon, Dayeon, ...., Hayeon]
test1 = [20, 98, ..., 86]
test2 = [50,  39, ...,39]

and

How do I set the name to key and test1, test2 to value in the function info??
I want to bundle the values in the same index and print them out!

For example,
{Positive: [20, 50], Nayeon: [98, 39],...} Like this,,

python dictionary list index

2022-09-20 22:25

1 Answers

dict(zip(name, zip(test1, test2)))


2022-09-20 22:25

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.