Skip to content

Instantly share code, notes, and snippets.

Created March 20, 2014 00:07
What would you like to do?
digits2alpha = {'1':('1'),
def strings(digitstring):
if len(digitstring) < 2:
return digits2alpha[digitstring[0]];
suffixes = strings(digitstring[1:])
vals = []
for prefix in digits2alpha[digitstring[0]]:
for suffix in suffixes:
return vals
if __name__ == "__main__":
z = strings('123')
print "Z is ", z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment