对于我正在编写的一些代码,我需要从1-30跳过迭代6.我天真地尝试的是
a = range(1,6) b = range(7,31) for i in a+b: print i
有没有办法更有效地做到这一点?
python python-2.x
python ×1
python-2.x ×1