def check_safe(lst):
	"""Check if any two elements of lst can form a line, 
	if so, there will be:
	abs(value2-value1)/(index2-index1)==1
	"""
	for i in range(len(lst)):
		for j in range(i+1, len(lst)):
			if abs((lst[j]-lst[i])*1.0/(j-i))==1:
				return False
	return True
Check if any two elements of lst can form a line, 
	if so, there will be:
	abs(value2-value1)/(index2-index1)==1
	
recipes/Python/475145_general_solutiEight/recipe-475145.py