雷瓦尔 用自定义变量替换特定值 安装 pip3 install revar 例子 输入 import revar text = "Hello, $username$ \n Nice to meet $who$" output = revar . replace ( text , { "$username$" : "decave27" , "$who$" : "you" }) print ( output ) 输出 Hello, decave27 Nice to meet you