creating sets of tuples in python

mySet = set(itertools.product(range(1,51), repeat=2))

OR

mySet = set((x,y) for x in range(1,51) for y in range(1,51))

Leave a Comment

tech