def prime(n):
	"""
	Generate all prime numbers less than n.
	"""
	yield 2
	primes = []
	for m in range(3,n,2):
		if all(m%p for p in primes):
			primes.append(m)
			yield m

	Generate all prime numbers less than n.
	
recipes/Python/576640_Prime_Number_Generator/recipe-576640.py