I want to create a set of values that can divide a specific number. In my code below, I want factors of number 12.
x=12
a=set(map(lambda i:i if(x%i==0),range(1,x+1)))
print(a)
I expected output to be {1,2,3,4,6,12}.
but i have got some error:
File "<ipython-input-18-7f73bd4c5148>", line 2
a=set(map(lambda i:i if(x%i==0),range(1,x+1)))
^
SyntaxError: invalid syntax