Q:

Change dict values from tuple to set python

I would like change my dict values to dict, not tuple like they are now. I have function which returns i elements of the combination n on k-places.
from itertools import combinations

def comb(n,k,i):
    if i <= 0 or i > n:
        return None
    d = dict((enumerate(combinations(range(1,n+1),k))))
    return d[i-1]

print(comb(5,3,1))

OUTPUT = (1, 2, 3)
EXPECTED = {1,2,3}

A:

Your expected output is a set, not a dictionary; just use set() on the result:
return set(d[i-1])

Demo:
>>> from itertools import combinations
>>> def comb(n,k,i):
...     if i <= 0 or i > n:
...         return None
...     d = dict((enumerate(combinations(range(1,n+1),k))))
...     return set(d[i-1])
... 
>>> print(comb(5,3,1))
{1, 2, 3}

To get a specific iteration of a iterable object, you could use an itertools.islice() call, rather than produce a dictionary with all results:
from itertools import combinations, islice

def comb(n, k, i):
    if not (0 > i >= n):
        return None
    d = combinations(range(1, n + 1), k)
    ith_item = next(islice(d, i - 1, None))
    return set(ith_item)

but there are probably more efficient ways of calculating a specific combination of n out of k than brute-forcing.

