You can use defaultdict (available from py 2.6+) for this:
from collections import defaultdict
foundColors = defaultdict(set)
for key,value in dictcolors.iteritems():
for color in value.split(','):
foundColors[color].add( key )
foundColors gives:
>>defaultdict(<type 'set'>, {'1': set(['Blue', 'Red']), '3': set(['Blue', 'Green', 'Red', 'Teal']), '2': set(['Blue', 'Red']), '5': set(['Green', 'Red', 'Teal']), '4': set(['Green', 'Red', 'Teal']), '7': set(['Orange']), '6': set(['Purple', 'Teal'])})
Another advantage of using it defaultdictis that it will not break when accessing numbers that do not exist in yours dictcolors. This is due to the fact that when accessing such keys, it initializes the key value with the empty type "default" (in this case set).
, - :
for number in range(10):
print number,list(foundColors[number])