# machine-learning-stu **Repository Path**: spiderking/machine-learning-stu ## Basic Information - **Project Name**: machine-learning-stu - **Description**: 学习机器学习的过程代码 - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 3 - **Created**: 2021-02-23 - **Last Updated**: 2021-02-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 通过书籍得到额外知识点 ## python的zip函数 ```python a = [1,2,3] b = [4,5,6] zipped = zip(a,b) # 返回一个对象 print(zipped) print(list(zipped)) # list() 转换为列表 [(1, 4), (2, 5), (3, 6)] ``` ## 字典生成式 + 字典推倒式说的是以for循环的方式得出,类似列表推到式的写法 + dict可以和zip结合使用,更加方便生成字典,省得写推倒式了 ```python a = [1,2,3] b = [4,5,6] print(dict(zip(a, b))) {1: 4, 2: 5, 3: 6} ```