20171211 查詢+心得Map two lists into a dictionary in Python
ttps://stackoverflow.com/questions/209840/map-two-lists-into-a-dictionary-in-python
Like this:
>>>keys=['a','b','c']
>>>values=[1,2,3]
>>>dictionary=dict(zip(keys,values))
>>>print(dictionary){'a':1,'b':2,'c':3}
--{心得}: zip()支援對多個list()的多維組合,組合後是一個多維的空間裡的任何一個點,這樣理解好些
但dict()字典格式,還是限定在2維的,超過2維(就是從3維開始 ,dict()就不支援 了)
相關文章
- Leetcode Merge Two Sorted ListsLeetCode
- 隱藏引數查詢和dictionary viewView
- Leetcode 21 Merge Two Sorted ListsLeetCode
- [leetCode][003] Intersection of Two Linked ListsLeetCode
- Leetcode-Merge Two Sorted ListsLeetCode
- Leetcode-Intersection of Two Linked ListsLeetCode
- Merge Two Sorted Lists leetcode javaLeetCodeJava
- LeetCode 21. Merge Two Sorted ListsLeetCode
- leetcode21_Merge Two Sorted ListsLeetCode
- Leetcode 160. Intersection of Two Linked ListsLeetCode
- 【Leetcode】160. Intersection of Two Linked ListsLeetCode
- LeetCode 第 21 題 (Merge Two Sorted Lists)LeetCode
- mybatis配置:map查詢空值返回MyBatis
- c++map 查詢元素和list查詢元素速度對比C++
- MYSQL高效能學習查詢心得MySql
- 我的MYSQL學習心得(7) : 查詢MySql
- LeetCode Merge Two Sorted Lists(021)解法總結LeetCode
- Python查詢-二分查詢Python
- sql 查詢 主外來鍵的 一點心得SQL
- gorm 使用map實現in 條件查詢用法GoORM
- [LintCode] Merge Two Sorted Lists 混合插入有序連結串列
- [LeetCode] Merge Two Sorted Lists 混合插入有序連結串列LeetCode
- oracle心得3--多表查詢@分組查詢@子查詢講解與案例分析@經典練習題Oracle
- 【LeetCode從零單排】No.160 Intersection of Two Linked ListsLeetCode
- 例項講解hadoop中的map/reduce查詢(python語言實現HadoopPython
- Python 3 字典(Dictionary)Python
- python 字串查詢Python字串
- python天氣查詢Python
- 資料結構與演算法 | Leetcode 21:Merge Two Sorted Lists資料結構演算法LeetCode
- Python has two GILsPython
- school dictionary, kids dictionary, children dictionary
- Python模組查詢路徑Python
- [python]pymongo查詢與修改PythonGo
- Python中字串查詢方法Python字串
- MyBatis學習筆記(四)使用map實現查詢和插入MyBatis筆記
- Mybatis之map操作使用者和模糊查詢擴充套件MyBatis套件
- python中的list、tuple和dictionaryPython
- oracle心得4--集合查詢@oracle中的多表連線@案例分析Oracle