More on negative strings. They are easier, if they only use one character.

Red Queen: What's one and one and one and one and one and one and one and
one and one and one and one and one and one?
Alice: I don't know. I lost count.
Red Queen: She can't do arithmetic.

3 --> 'aaa'
2 --> 'aa'
1 --> 'a'
0 --> ''
-1 -> -'a'
-2 -> -'aa'
-3 -> -'aaa'

Negative strings are easier if we can rearrange the order of the letters.
Like anagrams.

    >>> ''.join(sorted('forty five'))
    ' effiortvy'
    >>> ''.join(sorted('over fifty'))
    ' effiortvy'

Instead of counting (positively and negatively) just the letter 'a', we do
the whole alphabet.

By when order matters, we get an enormous free group, which Python
programmers by accident see.

I hope this helps.

-- 
Jonathan
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to