[Tutor] Every Other

Alan G alan.gauld at freenet.co.uk
Mon Jun 20 10:17:37 CEST 2005


JOhn,

> This is probably it:
> >>> arr = range(20)
> >>> arr[::2]

You are probably right, I forgot that slicing now 
had a 3rd element... :-)

Alan G.


More information about the Tutor mailing list