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 sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to