In this simple exercise, you will build a program that takes a value, `integer `, and returns a list of its multiples up to another value, `limit `. If `limit` is a multiple of ```integer```, it should be included as well. There will only ever be positive integers passed into the function, not consisting of 0. The limit will always be higher than the base.

For example, if the parameters passed are `(2, 6)`, the function should return `[2, 4, 6]` as 2, 4, and 6 are the multiples of 2 up to 6.

If you can, try writing it in only one line of code.

Difficulty: EASY
Tags: Fundamentals

Data structures
Skill types: Data structures

Starter code:
def find_multiples(integer, limit):
	

Solutions:
def find_multiples(integer, limit):
	return list(range(integer, limit + 1, integer))


def find_multiples(integer, limit):
	arr = []
	count = integer
	while count <= limit:
		arr.append(count)
		count += integer
	return arr


find_multiples = lambda a, b: list(range(a, b + 1, a))


def find_multiples(integer, limit):
	return [i for i in range(integer, limit + 1, integer)]


def find_multiples(x, limit):
	return list(range(x, limit + 1, x))


find_multiples = lambda i, l: list(range(i, l + 1, i))


def find_multiples(integer, limit):
	return [i for i in range(0, limit + 1, integer) if i != 0]


def find_multiples(integer, limit):
	result = []
	i = integer
	for i in range(limit + 1):
		if i % integer == 0 and i != 0:
			result.append(i)
	return result


def find_multiples(n, l):
	return list(range(n, l + 1, n))


def find_multiples(integer, limit):
	return [integer * count for count in range(1, int(limit / integer) + 1)]


def find_multiples(integer, limit):
	return [integer * mult for mult in range(1, limit // integer + 1)]


def find_multiples(integer, limit):
	numbers = [i * integer for i in range(1, limit + 1) if i * integer <= limit]
	return numbers


def find_multiples(integer, limit):
	multiplies = []
	for i in range(integer, limit + 1, integer):
		multiplies.append(i)
	return multiplies


def find_multiples(integer, limit):
	mas = []
	n = integer
	while n <= limit:
		mas.append(n)
		n += integer
	return mas


def find_multiples(integer, limit):
	return list(range(integer, limit + integer, integer)) if limit % integer == 0 else list(range(integer, limit, integer))


from typing import List

def find_multiples(integer: int, limit: int) -> List[int]:
	return list(filter(lambda _it: not _it % integer, range(1, limit + 1)))


def find_multiples(integer, limit):
	return [x for x in range(integer, limit + 1) if x % integer == 0]


def find_multiples(integer, limit):
	answer = []
	i = 0
	number = integer
	while number <= limit:
		i = number
		answer.append(i)
		number += integer
	return answer


def find_multiples(integer, limit):
	n = 1
	res = list()
	while n * integer <= limit:
		res.append(n * integer)
		n += 1
	return res


def find_multiples(integer, limit):
	i = 1
	res = []
	while i * integer <= limit:
		res.append(i * integer)
		i += 1
	return res


def find_multiples(integer, limit):
	n = integer
	answer = []
	while n <= limit:
		answer.append(n)
		n += integer
	return answer


def find_multiples(integer, limit):
	result = []
	num = 1
	while integer * num <= limit:
		result.append(integer * num)
		num += 1
	return result


def find_multiples(integer, limit):
	lst = []
	acc = integer
	for num in range(integer, limit + 1):
		if acc <= limit:
			lst.append(acc)
			acc += integer
	return lst


def find_multiples(integer, limit):
	arr = [integer]
	x = integer
	if limit // integer:
		while x + integer <= limit:
			x += integer
			arr.append(x)
	return arr


def find_multiples(integer, limit):
	lista = []
	for i in range(integer, limit + 1):
		lista.append(i)
	return list(filter(lambda numero: numero % integer == 0, lista))


def find_multiples(integer, limit):
	list = []
	for i in range(1, limit + 1):
		if i * integer <= limit:
			list.append(i * integer)
	return list


def find_multiples(integer, limit):
	out = []
	for i in range(integer, limit + 1, integer):
		out.append(i)
	return out


def find_multiples(integer, limit):
	res = []
	for i in range(int(limit / integer)):
		res.append((i + 1) * integer)
	return res


def find_multiples(integer, limit):
	grup = []
	for i in range(1, int(limit) + 1):
		if i % integer == 0:
			grup.append(i)
	return grup


def find_multiples(integer, limit):
	divizor = []
	for i in range(limit + 1):
		if i < integer:
			pass
		elif i % integer == 0:
			divizor.append(i)
	return divizor


def find_multiples(integer, limit):
	x = []
	i = 1
	r = int(limit / integer)
	for i in range(r):
		x.append(integer * (i + 1))
	return x


def find_multiples(integer, limit):
	a = list(range(integer, limit + 1, integer))
	return a
find_multiples(5, 25)


def find_multiples(integer, limit):
	multiple_list = []
	for num in range(limit + 1):
		if num == 0:
			pass
		elif num % integer == 0:
			multiple_list.append(num)
		else:
			pass
	return multiple_list


def find_multiples(integer, limit):
	result = 0
	arr = []
	for i in range(int(limit / integer)):
		result = result + integer
		arr.append(result)
	return arr


def find_multiples(integer, limit):
	list = []
	for n in range(integer, limit + 1, 1):
		if n % integer == 0:
			list.append(n)
	return list


def find_multiples(integer, limit):
	k = list()
	if limit < integer:
		return k
	for a in range(1, limit // integer + 1):
		k.append(a * integer)
	return k


def find_multiples(integer, limit):
	result_list = [integer]
	counting = integer
	while counting < limit:
		counting += integer
		if counting > limit:
			break
		else:
			result_list.append(counting)
	return result_list


def find_multiples(a, number):
	my_primes = []
	for i in range(a, number + 1):
		if i % a == 0:
			my_primes.append(i)
	return my_primes


def find_multiples(integer, limit):
	list = []
	for x in range(integer, limit + 1, integer):
		list.append(x)
	return list


def find_multiples(integer, limit):
	n = 1
	mults = []
	while integer * n <= limit:
		mults.append(integer * n)
		n += 1
	return mults


def find_multiples(integer, limit):
	output = [integer]
	counter = 2
	count = 1
	while output[count - 1] <= limit:
		output.append(counter * integer)
		counter += 1
		count += 1
	output.pop()
	return output


def find_multiples(integer, limit):
	list = [integer]
	count = 2
	while integer * count <= limit:
		list.append(integer * count)
		count += 1
	return list


def find_multiples(integer, limit):
	m = 1
	new_list = []
	new_integer = integer
	while new_integer < limit:
		new_integer = integer * m
		if new_integer > limit:
			break
		new_list.append(new_integer)
		m += 1
	return new_list


def find_multiples(integer, limit):
	l = []
	for x in range(1, limit + 1):
		z = integer * x
		if z <= limit:
			l.append(z)
		else:
			break
	return l


def find_multiples(integer, limit):
	return list([x for x in [i if i % integer == 0 else 0 for i in range(1, limit + 1)] if x > 0])


def find_multiples(integer, limit):
	n = 1
	return_array = []
	while integer * n <= limit:
		return_array.append(integer * n)
		n = n + 1
	return return_array


def find_multiples(integer, limit):
	res = []
	multiple = 0
	flag = 1
	while flag <= limit // integer:
		multiple = integer * flag
		flag += 1
		res.append(multiple)
	return res


def find_multiples(integer, limit):
	sol = []
	for i in range(1, limit // integer + 1):
		sol.append(integer * i)
	return sol


def find_multiples(integer, limit):
	lst = []
	for item in range(integer, limit + 1, 1):
		if item % integer == 0:
			lst.append(item)
	return lst


def find_multiples(integer, limit):
	ans = []
	count = integer
	while count <= limit:
		ans.append(count)
		count += integer
	return ans


def find_multiples(integer, limit):
	ans = []
	for i in range(1, limit // integer + 1):
		ans.append(integer * i)
	return ans


def find_multiples(i, l):
	return list(range(i, l if not l % i == 0 else l + i, i))


def find_multiples(integer, limit):
	answ = []
	answer = 0
	n = 1
	while answer < limit:
		answer = integer * n
		if answer <= limit:
			answ.append(answer)
			n += 1
	return answ


def find_multiples(int, lmt):
	return list(range(int, lmt + 1, int))


def find_multiples(integer, limit):
	i = 1
	y = []
	while integer * i <= limit:
		output = integer * i
		y.append(output)
		i += 1
	return y


def find_multiples(integer, limit):
	arr = [integer]
	for i in range(int(limit // integer) - 1):
		if arr[-1] < limit:
			arr.append(2 * integer + integer * i)
	return arr


def find_multiples(integer, limit):
	l = []
	i = integer
	while integer <= limit:
		l.append(integer)
		integer += i
	return l


def find_multiples(integer, limit):
	list = []
	i = 1
	m = integer
	for m in range(integer, limit + 1):
		if m >= integer and m == integer * i and (m <= limit):
			list.extend([m])
			i = i + 1
			m = m * i
	return list


def find_multiples(i, l):
	z = []
	for a in range(1, l + 1):
		if a % i == 0:
			z.append(a)
	return z


def find_multiples(integer, limit):
	count = int(limit / integer)
	result = []
	for i in range(count):
		result.append(integer * (i + 1))
	return result


def find_multiples(d, l):
	return list(filter(lambda x: x % d == 0, range(1, l + 1)))


def find_multiples(integer, limit):
	list = []
	i = 1
	while i <= limit / integer:
		list.append(integer * i)
		i = i + 1
	return list


def find_multiples(integer, limit):
	print(integer, limit)
	answer = [integer]
	while answer[-1] + integer <= limit:
		answer.append(answer[-1] + integer)
	return answer


def find_multiples(integer, limit):
	li = []
	for i in range(0, limit + 1, integer):
		li.append(i)
	li.pop(0)
	return li


def find_multiples(integer, limit):
	numList = []
	count = 1
	howMuch = int(limit / integer)
	for x in range(howMuch):
		numList.append(integer * count)
		count += 1
	return numList


def find_multiples(integer, limit):
	f = []
	for x in range(integer, limit + 1, integer):
		f.append(x)
	return f


def find_multiples(integer, limit):
	lst = []
	count = 1
	while integer * count <= limit:
		var = integer * count
		lst.append(var)
		count += 1
	return lst


def find_multiples(integer, limit):
	aha = []
	x = 0
	while x <= limit:
		x = x + integer
		if x <= limit:
			aha.append(x)
	return aha


def find_multiples(integer, limit):
	m = []
	for i in range(limit + 1):
		if i / integer == int(i / integer):
			m.append(i)
	m.remove(0)
	return m


def find_multiples(integer, limit):
	count = 1
	res = []
	while True:
		somme = integer * count
		if somme > limit:
			break
		else:
			res.append(somme)
			count += 1
	return res


def find_multiples(integer, limit):
	result = []
	number = 1
	temp = integer * number
	while temp <= limit:
		result.append(temp)
		number += 1
		temp = integer * number
	return result