A few words about Python’s extended slices

One thing that most Python users learn at the very beginning are list slices – defining a part of the list using the samplelist[begin:end] syntax. It’s great thing, but – surprisingly – many people don’t even know, that there’s different syntaxt for this, containing one additional parameter – “step”: samplelist[begin:end:step]. How does it work?

Continue reading