title: Python split string in moving window
body: <p>I have a string with digits like so - <code>digit = "7316717"</code></p>
  
  <p>Now I want to split the string in such a way that the output is a moving window of 3 digits at a time. So I get -  </p>
  
  <p><code>["731", "316", "167", "671", "717"]</code></p>
  
  <p>How would the approach be? Straightforward way is to put in for-loop and iterate. But I feel some inbuilt python string function can do this in less code. Know of any such approach?</p>