If it's a general mapping, you can just create a python dictionary:
sage: d = { 'a' : 5, 'b': 6, 'c': 7, 'd': 91, 'e' : -1 }
sage: [ d.get(_, '?') for _ in 'baacope' ]
[6, 5, 5, 7, '?', '?', -1]
The "?" is a default fallback if the character isn't defined in the
dictionary.
H
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org