When creating a three-digit natural number by repeatedly using number cards with the numbers 1 to 9 written on them, find the average of the numbers whose remainder when divided by 3 is 2.
1 9 1 [OP_LIST_ARANGE] 3 [OP_LIST_GET_PRODUCT] 3 2 [OP_LIST_DIVIDE_AND_REMAIN] [OP_LIST_MEAN]
var_a = 1
var_b = 9
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.product(list_b, repeat=var_d))
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_e = 3
var_f = 2
list_c = [] 
var_e = int(var_e)
var_f = int(var_f)
if var_f < 0:
    var_f = var_f + var_e
for i in list_b:
    i = int(i)
    if i%var_e == var_f:
        list_c.append(i)
list_c = [float(i) for i in list_c]
var_g = sum(list_c)/len(list_c)
print(int(var_g))