| 1 | initial version |
I think when you evaluate
mot=Word('y1')
it treats 'y' and '1' as separate characters, giving a word of length 2. Instead,
mot=Word(['y1'])
makes it have length one. To force it to live in Mots, do this:
sage: mot = Mots(Word(['y1']))
sage: Word(['y1']) in Mots
False
sage: Mots(Word(['y1'])) in Mots
True
Not ideal, but it seems to work.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.