In most circumstances for (key, val) in data won't work, as the default dictionary iterable only contains the keys. You want for key, val in data.items():
myset = {x for x in "This is my stuff".split()}
mydict = {x:len(x) for x in "This is my stuff".split()}
The advantage of this syntax is that : unambiguously introduces a key: value pair, whereas (key, value) could also occur in a list comprehension (e.g., by accident).
(key, val) in data
works if data = {(1,2) : 3}