Letter separator in words when alphabet has multicharacter letters
Why do i get:
sage: W = FiniteWords(['a','b'])
sage: [w for w in W.iterate_by_length(2)]
returns as I wish
[word: aa, word: ab, word: ba, word: bb]
but
sage: W = FiniteWords(['a1','a2'])
sage: [w for w in W.iterate_by_length(2)]
returns
[word: a1,a1, word: a1,a2, word: a2,a1, word: a2,a2]
I do not want the commas to appear here, how can I get
[word: a1a1, word: a1a2, word: a2a1, word: a2a2]
instead?
add a comment