The easiest way to think of this is that you want to iterate through every combination with a length one less than the list. To do this, we can use itertools.combinations():
import itertools
color = ["red","blue","red","green","blue"]
for rest in itertools.combinations(color, len(color)-1):
print(rest)
Which gives us:
('red', 'blue', 'red', 'green')
('red', 'blue', 'red', 'blue')
('red', 'blue', 'green', 'blue')
('red', 'red', 'green', 'blue')
('blue', 'red', 'green', 'blue')
This is a good solution as it works on iterables as well as sequences, is very readable, and should be nice and fast.
If you also need the current value, you can also get that easily, as combinations() gives you a predictable order, so we just iterate through both at the same time with zip() (naturally, if you want the best performance, use itertools.izip() under Python 2.x, as zip() creates a list, not a generator as in 3.x).
import itertools
color = ["red","blue","red","green","blue"]
for c, rest in zip(color, itertools.combinations(reversed(color), len(color)-1)):
print(c, rest)
red ('blue', 'green', 'red', 'blue')
blue ('blue', 'green', 'red', 'red')
red ('blue', 'green', 'blue', 'red')
green ('blue', 'red', 'blue', 'red')
blue ('green', 'red', 'blue', 'red')
Here I reverse the input for comibinations() so it works from left to right - you can reverse color in the zip() instead to get right to left.
So yes, in short, it's a one line solution (two if you count the import).