torsdag 17. november 2016

Ammo: Sliding Windows - Python tip of the day

Just a quick Python tip of the day.

I regularly find my self in the position of needing to slice lists with "sliding windows"

Like if I have the list {1,2,3,4,5,6,7,8} I would like to return {{1,2},{2,3},{3,4}..etc}

Just found this great way of doing it in dynamo. (I'm sure there are many ways of doing it, but quite simple this one anyways.)



3 kommentarer:

  1. Hey there Jostein, there is a node List.Sublists that does this and a little more, you should give it a look. -Nick Curtis

    SvarSlett
  2. THANK YOU FOR THE INFORMATION
    PLEASE VISIT US
    autocad solutions IN USA









    SvarSlett
  3. CASINO - 1 Mohegan Sun Blvd Uncasville, CT - Mapyro
    Hotel - This 5-star casino resort is a 2.3-minute walk from Mohegan 원주 출장안마 Sun Arena and 1 Mohegan 속초 출장샵 Sun Blvd Uncasville, Connecticut. Free WiFi 이천 출장마사지 is available at  Rating: 8.4/10 · ‎2,314 reviews · 광명 출장샵 ‎Price range: room rates from 동두천 출장샵 $119 per night (USD) - We Price Match!

    SvarSlett