Although there is nothing syntactically wrong with this code, it is hard to read and can be simplified to a set comprehension. Using set comprehension is more performant since there is no need to create a transient list.
mapping = set([num for num in my_magic_nums])
mapping = {num for num in my_magic_nums}