通常有这样的方法:for index, item in enumerate(n):if index % nth == 0: # If the output is not like you want, try doing (index + 1), or enumerate(n, start=1).print(item)