我有一个文本文件
文本,例如izvo|enje ovla{}ujem Milivojevi} garae ~lan
。你知道吗
通常我在Microsoft office word
Find
和Replace
选项中使用每个符号来更改字母。你知道吗
我想得到文本izvodenje ovlascujem Milivojevic garaze clan
所以呢
|
更改为c
{
更改为s
~
更改为c
等等。你知道吗我该怎么做?我想自动化这个过程,将代码保存在文件中,并像脚本一样使用这些代码。
我想用Python
,(我真的是初学者)
印刷品:
其余的都很琐碎,所以这是一个自学python的好机会
将字符串存储在var中并使用replace('old str','new str')函数
更简单的方法是使用如下方法替换:
对于多个替换,我建议如下循环:
相关问题 更多 >
编程相关推荐