python中zip的应用,,#!/usr/bin
python中zip的应用,,#!/usr/bin
#!/usr/bin/env python
#_*_coding:utf-8_*_
from random import shuffle
a = [1, 2, 3, 4]
shuffle(a)
b = sorted(a)
temp = zip(a, b)
print temp
result = dict(temp)
print result
temp1 = zip(*temp)
print temp1
a1 = list(temp1[0])
b1 = list(temp1[1])
print a1, b1
python中zip的应用
相关内容
- 在import scipy.misc 后找不到 imsave的解决方案,
- python进行机器学习(三)之模型选择与构建,,Scikit-L
- python求均值、方差、标准差,,import num
- 程序媛计划——python网络编程,,class1 正则表
- Python 字典 items() 方法,,Python 字典
- Python Flask 天气查询,,一直觉得自己的博客太
- Python IDLE背景主题,,相信刚进入pytho
- Python中的*args和**kwarg,,可变参数 *args
- 第十三天python3 生成器yield,,生成器generat
- python 生成器和迭代器,,迭代器协议1.迭代器
评论关闭