有没有办法使用Pythontr
进行字符翻译/音译(有点像命令)?
Perl 中的一些示例是:
my $string = "some fields";
$string =~ tr/dies/eaid/;
print $string; # domi failed
$string = 'the cat sat on the mat.';
$string =~ tr/a-z/b/d;
print "$string\n"; # b b b. (because option "d" is used to delete characters not replaced)