1.argparse
2.replace
1.argparse
argparse tutorial地址:https://docs.python.org/3/howto/argparse.html#introducing-positional-arguments
2.replace
replace()方法把字符串中的old(字符串)换成new(字符串),若指定第三个参数,则是规定替换不超过n次
>>>str = "this is string example....wow!!! this is really string" >>>print str.replace("is", "was") thwas was string example....wow!!! thwas was really string