Christmas is coming, and Santa has a long list to go through, to find who deserves presents for the big day. Go through a list of children, and return a list containing every child who appeared on Santa's list. Do not add any child more than once. Output should be sorted.
~~~if:java
For java, use Lists.
~~~

Comparison should be case sensitive and the returned list should contain only one copy of each name: `"Sam"` and `"sam"` are different, but `"sAm"` and `"sAm"` are not.

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Sorting

Data structures

Starter code: def find_children(santas_list, children):
	

Solutions:
def find_children(santas_list, children):
	return sorted(set(santas_list) & set(children))


def find_children(a, b):
	return sorted(set(a) & set(b))


find_children = lambda s, c: sorted((e for e in c if e in s))


find_children = lambda x, s: sorted(set(x) & set(s))


def find_children(arr1, arr2):
	L = []
	for i in arr2:
		if i in arr1:
			if i not in L:
				L.append(i)
	L.sort()
	return L


def find_children(santas, children):
	return sorted(set(children) & set(santas))


def find_children(santas_list, children):
	return sorted({child for child in children if child in santas_list})


def find_children(santas_list, children):
	result = []
	if len(santas_list) < len(children):
		for child in santas_list:
			if child in children:
				result.append(child)
	else:
		for child in children:
			if child in santas_list:
				result.append(child)
	return sorted(result)


def find_children(santas_list, children):
	return sorted([names for names in santas_list if names in children])


find_children = lambda s, c: sorted(set([i for i in c if i in s]))