You can use this dictation:
d = {x: [v for u,v in data if u == x] for x,y in data}
Note, however, that this is rather inefficient, as it will loop through the entire list of n+1times!
Better to use a simple old loop for:
d = {}
for x,y in data:
d.setdefault(x, []).append(y)
Alternatively, you can also use itertools.groupy(as discovered by yourself):
groups = itertools.groupby(sorted(data), key=lambda x: x[0])
d = {k: [g[1] for g in group] for k, group in groups}
In all cases dends{1: [2, 3, 4], 2: [1, 2, 3]}