1.常用方法:https://blog.csdn.net/neweastsun/article/details/51965226
2.itertools.permutations(num_list)-permutations(p[,r]);返回p中任意取r个元素做排列的元组的迭代器
for i in permutations([1, 2, 3], 3):
print i
(1, 2, 3)
(1, 3, 2)
(2, 1, 3)
(2, 3, 1)
(3, 1, 2)
(3, 2, 1)
第二个参数不写,默认是列表的长
3.
import itertools
for i in itertools.count(-5):
print(i)
打印结果从 -5 依次递增 1