擅长:python、mysql、java
<p>简单方法:使用原始列表中的两个块构建重新排序的列表:</p>
<pre><code>station_list = [1, 2, 3, 4]
start = 1
for i in station_list[start:] + station_list[:start]:
print (i)
</code></pre>
<p>如果不想构造重新排序的桩号列表,可以改用索引换行:</p>
<pre><code>station_list = [1, 2, 3, 4]
start = 1
n = len(station_list)
for i in range(n):
print (station_list[(i+start)%n])
</code></pre>