a quickie: range - x

Kent Johnson kent at kentsjohnson.com
Thu Nov 30 17:28:48 CET 2006


Steven D'Aprano wrote:
> On Wed, 29 Nov 2006 19:42:16 -0800, rjtucke wrote:
> 
>> I want an iterable from 0 to N except for element m (<=M).


> x = range(m-1) + range(m+1, N)

Should be range(m) + range(m+1, N)

Kent



More information about the Python-list mailing list