How to use the zip () method in python Dictionary
This article mainly introduces how to use the zip () method in the python dictionary, which has a certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article.
Zip ()
Define the zip () method to package the key values into a dictionary
Li1 = ["name", "age"] li2 = ["hacker", "18"] print (dict (zip (li1,li2)
The running results are as follows:
{'name':' hacker', 'age':' 18'}
Thank you for reading this article carefully. I hope the article "how to use zip () in python Dictionary" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!