title: Is there a way to rotate values in a list but every 3rd position on the list is stationary?
body: <p>for some homework, my teacher decided to give us a coding challenge that she couldn't work out herself. The challenge was that given a list [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] rotate every second value right along the list while keeping every 3rd value stationary.</p>
  
  <p>Below is the code I have tried to use but it only keeps the value at position 0 stationary, whereas I need to keep the values at positions [0, 2, 4, 6, 8, 10]</p>
  
  <pre><code>rotation = list(teams)       # copy the list
  random.shuffle(rotation)
  
  fixtures = []
  for i in range(0, len(teams)-1):
      fixtures.append(rotation)
      rotation = [rotation[0]] + [rotation[-1]] + rotation[1:-1]
  </code></pre>
  
  <p>The expected result should be that he first iteration of the list should return [1, 12, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10] and the second iteration should return [1, 10, 3, 12, 5, 2, 7, 4, 9, 6, 11, 8]</p>