def map(self, data):
result = []<EOL>for char in data:<EOL><INDENT>ret = None<EOL>for lookup in self.mapping:<EOL><INDENT>ret = lookup(char)<EOL>if ret is not None:<EOL><INDENT>break<EOL><DEDENT><DEDENT>if ret is not None:<EOL><INDENT>result.append(ret)<EOL><DEDENT>else:<EOL><INDENT>result.append(char)<EOL><DEDENT><DEDENT>return result<EOL>
Mapping part of string preparation.