def _randomElements(ring, n):
	"""Return a list of length n with random elements (except 0) from ring"""
	
	assert(n>=0)
	ret = []
	
	while(len(ret)<n):
		new = ring.random_element()
		if new != ring(0): ret.append(new)
	
	return ret