Project Euler 23 - Non-Abundant Sums
set

You build a dictionary to take advantage of the fast \$O(1)\$ membership test of the keys, but you never use the value (that is always 1), so you could just use a set that has the same \$O(1)\$ membership test but no values.

Returning the result

It is standard practice to return the results, not print them. If a result is returned, the user of the function may decide to do anything with it, including printing it. If you just print the result, no further re-use is possible.

Avoid globals when unnecessary

Globals may be changed anytime, from anywhere in your program. If you modify a global once wrongly by accident the whole program goes bogus. Just return the dict from insert_to_dictionary (I would call it abundant_sums because types should be in names and it is more descriptive.)

Use the built-ins

sum = 0
for i in range(1, 28123, 1):
    if i not in dict:
        print i
        sum += i
print sum


Becomes:

return sum(i for i in range(1, 28123, 1) if i not in set_)


I also avoided printing long lists of numbers because is not required (just the final answer is required).