Did I find the right examples for you? yes no

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)
Given a list of integers, return a string with ranges collapsed

        def output_list(l):
	"Given a list of integers, return a string with ranges collapsed"
	if not l:
		return "[]"
	l.sort()
	ret=[]
	start=l[0]
	end=l[0]
	for i in l[1:]:
		if end+1==i:
			end=i
			continue
		if start!=end:
			ret.append("%d-%d" % (start,end))
		else:
			ret.append("%d" % start)
		start=i
		end=i
	if start!=end:
		ret.append("%d-%d" % (start,end))
	else:
		ret.append("%d" % start)
	return "[%s]" % (",".join(ret))
        


src/a/l/albumidentify-HEAD/src/renamealbum/albumidentify.py   albumidentify(Download)
				release.tracks[trackind].title))
		util.report(" %s" % (
			util.output_list(removed_releases[releaseid].keys())
			))
 
		return
	for i in possible_releases:
		util.report(" %s (tracks found: %s)" % (lookups.get_release_by_releaseid(i).title,util.output_list(possible_releases[i].keys())))
 
def get_puids_for_release(releaseid):
		assert fileid not in possible_releases[releaseid].values(),(fileid,possible_releases[releaseid])
		possible_releases[releaseid][found_tracknumber]=fileid
		print "Found track",found_tracknumber,"(",release.tracks[found_tracknumber-1].title,")","of",release.title,":",os.path.basename(fileid),"(tracks found: %s)\x1b[K" % (util.output_list(possible_releases[releaseid].keys()))
		return
	else:
					break
	print " Found tracks: %s" % (
		util.output_list(possible_releases[releaseid].keys())),
	if util.list_difference(range(1,len(release.tracks)+1),
			possible_releases[releaseid].keys()):
		print " Missing tracks: %s"% (
			util.output_list(
				util.list_difference(range(1,len(release.tracks)+1),