Skip to content

Instantly share code, notes, and snippets.

View f-f's full-sized avatar
🍝
All undocumented software will be reverse-engineered and rewritten

Fabrizio Ferrai f-f

🍝
All undocumented software will be reverse-engineered and rewritten
View GitHub Profile
@f-f
f-f / rec_alph.py
Created December 24, 2014 17:51
Recursive alphabetical combinations
import string
import itertools as it
chars=list(string.ascii_lowercase)
def gen_expansion(inp, length=1):
if not length:
return inp
if isinstance(inp, str):
accodati = [inp+c for c in chars]