When reordering the number magnet 586 to create another three-digit number, what is the largest number that can be made?
586 [OP_NUM2LIST] 3 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX]
var_a = 586
list_a = []
var_a = int(var_a)
while var_a//10 > 0:
    list_a.append(var_a%10)
    var_a = var_a//10
list_a.append(var_a%10)
list_a = list_a[::-1]
var_b = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_b))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_c = 1
list_c=list_b.copy()
list_c.sort()
var_d = list_c[-var_c]
print(int(var_d))