Arrays: Left Rotation

  • + 1 comment

    Yes both qzangs and my answer is correct. In python index slicing (indices[start:stop:step]), works like so...

    We will begin with the index specified at start and traverse to the next index by our step amount (i.e. if step = 2, then we jump over every other element, if step = 3, we jump over 2 elements at a time). If step is not specified it is defaulted to 1. We continue steping from our start point until we come to or exeed our stop point. We do NOT get the stop point, it simply represents the point at which we stop.

    I love Python :)