i need to know exactly how to use string.maketrans
python, python-2.7
Solution
After you've created a translation table using `string.maketrans`, you can use the result of that to the `str.translate` method, eg:
import string
trans = string.maketrans('ae', 'bx') # a->b and e->x
text = 'abcdef'
print text.translate(trans)
# bbcdxf
Problem
I am new to python, please can any one tell me how to use `string.maketrans ()`, with some examples please ? I find some like: ``` allchars = string.maketrans ('', '') ``` that return the character map, but i couldn't figure out how to use this approach Thanks for your help