标签:div int port imp lis format import type for
import numpy as np letters = [‘a‘, ‘b‘, ‘c‘] nums = [1, 2, 3] for letter, num in zip(letters, nums): print("{}: {}".format(letter, num)) # 将多个list的数据组合成tuple的list # 得到: [(4, 1), (5, 2), (6, 3)]. # 相当于通过两个数组,组合成了一个矩阵 arr=list(zip([4, 5, 6], [1, 2, 3])) res = np.array([[3,4,5], [6,7,8]]) loc = np.where(res >= 0.1) print(loc) print(type(loc)) for pt in zip(*arr[::-1]): print(‘----------------‘) print(pt) print(pt[0]) print(pt[1])
。
标签:div int port imp lis format import type for
原文地址:https://www.cnblogs.com/guxingy/p/12216575.html