Combining values corresponding to the same key
Indentation matters a lot in Python.  Please follow the PEP 8 standard, which is 4 spaces.

This code feels very procedural.  Python can be much more expressive than that, if you take advantage of features like list comprehensions.

You've used a lot of variables: line, row, l, keyvalues, items, item, key, value, i, prevval, cols, newvalue, newlist, j, newset — too many for me to keep track of what each represents.  You could reduce the mental load by eliminating variables for ephemeral expressions.  For example, you could eliminate items by writing for item in keyvalues.split(",").

I see that you considered using the csv module, but didn't.  If you did, you could have simplified


for line in sys.stdin:
  line = line.strip()
  row = line.split('\t')



… to for row in csv.reader(fileinput.input(), delimiter='\t').  I recommend fileinput instead of sys.stdin so that the user has the option of passing a filename on the command line.

The getVal(k) function can just be replaced by dict.get(k, None).  It would be better to avoid choosing dict as the name of a variable, since it shadows the dict() constructor.

Suggested solution

import csv
import fileinput

data = {}

for row in csv.reader(fileinput.input(), delimiter='\t'):
    values = [set(col.split(',')) for col in row]
    for key in values.pop(0):   # Numbers in column 0
        data[key] = [
            new_col.union(old_col)
            for new_col, old_col in zip(values, data.get(key, values))
        ]

for key, values in data.items():
    print '\t'.join([key] + [','.join(col) for col in values])