Rosetta: Range extraction

breamoreboy at gmail.com breamoreboy at gmail.com
Mon Apr 24 21:41:19 EDT 2017


On Tuesday, April 25, 2017 at 12:13:42 AM UTC+1, Gregory Ewing wrote:
> bartc wrote:
> > On 24/04/2017 09:20, Robert L. wrote:
> > 
> >> old = list[0]
> >> list.slice_before{|n| [n-old>1,old=n][0]}.
> >> map{|a| a.size<3 ? a.join(",") : [a[0],a[-1]].join("-")}.
> >> join ","
> > 
> > Is this supposed to be Python code?
> 
> I think it's Ruby. Maybe posted to the wrong group?
> 
> -- 
> Greg

Whatever the case his revolting antisemitic signatures are not welcome here.  I'll not repeat it here but you can see the original on gg that bartc has obviously snipped.

Kindest regards.

Mark Lawrence.


More information about the Python-list mailing list