def solution(nums: list) -> str:
import re
res_str = '0123456789'
for n in nums:
num_str = str(n)
for i in num_str:
res_str = re.sub(i, '', res_str)
return res_str
def solution(list):
target = [str(x) for x in range(10)]
current = ‘’.join([str(x) for x in list])
result = [x for x in target if x not in current]
return ‘’.join(result)
if name == ‘main’:
datas = [[12, 34, 56, 78],[2015, 8, 26],[276, 575], [864, 896, 744]]
for data in datas:
result = solution(data)
print(result)
def solution(nums: list) -> str:
str1 = '0123456789'
s = ''.join([str(x) for x in nums])
result = []
for x in str1:
if x not in s:
result.append(x)
return ''.join(result)
assert solution([12, 34, 56, 78]) == "09"
assert solution([2015, 8, 26]) == "3479"
assert solution([276, 575]) == "013489"
assert solution([864, 896, 744]) == "01235"
def solution(nums: list) -> str:
str_nums = str(nums)
return_str = ""
for i in range(10):
if str(i) not in str_nums:
return_str += str(i)
return return_str
def mystic_num(num_list):
st = '0123456789'
st_list = [str(i) for i in num_list]
st_num = "".join(st_list)
not_in_str_list = [i for i in st if i not in st_num]
not_in_str = "".join(not_in_str_list)
return not_in_str
assert mystic_num([45,67,12,2,3,9]) == "08"
assert mystic_num([45,67,12,8]) == "039"
def solution(nums: list) -> str:
return ''.join([str(i) for i in range(10) if
i not in list(set([int(j) for j in ''.join([str(nums[i]) for i in range(len(nums))])]))])
assert solution([12, 34, 56, 78]) == "09"
assert solution([2015, 8, 26]) == "3479"
assert solution([276, 575]) == "013489"
assert solution([864, 896, 744]) == "01235"