Skip to content

Instantly share code, notes, and snippets.

def enum(sofar, new):
if len(new) == 0:
return sofar
else:
return enum (sofar + new[0] + 'r', new[1:]) \
+ enum (sofar + new[0] + 'g', new[1:]) \
+ enum (sofar + new[0] + 'b', new[1:]) \