Compute the Mode of a List in Python

An example that uses this code Compute The Average, Min, Max And Mode Of A List In Python.

def mode(list):
	d = {}
	for elm in list:
			d[elm] += 1
			d[elm] = 1
	keys = d.keys()
	max = d[keys[0]]
	for key in keys[1:]:
		if d[key] > max:
			max = d[key]

	max_k = []		
	for key in keys:
		if d[key] == max:
	return max_k,max