7 kyu Form The Minimum
https://www.codewars.com/kata/5ac6932b2f317b96980000ca/train/python
Task
Given a list of digits, return the smallest number that could be formed from these digits, using the digits only once (ignore duplicates). Only positive integers in the range of 1 to 9 will be passed to the function.
Verbalization
Exclude duplicated digits = select digits only once (use set())
Sort digits from small (use sorted())
join digits (append and join() be careful that join() can be used only for string)
Code
def min_value(digits):
s = set(digits)
d = sorted(s)
n = []
for i in d:
n.append(str(i))
return int("".join(n))