def findprime(x):
	"""
	This function generate a list containing all the prime numbers less than x.
	It takes advantage of nested for loop to find prime numbers.
	x argument should be a natural number that is more than two.
	findprime(x) --> list
	"""
	temp_list = range(2, x)
	prime_list = []

	for i in temp_list:
		for j in range(2, i):
			if i % j == 0:
				break
		else:
			prime_list.append(i)

	return prime_list