# python实现合并两个文件并打印输出 import fileinput file_Path1 = input("请输入第一个合并文件:") file_Path2 = input("请输入第二个合并文件:") def demo_fileinput(fp1,fp2): with fileinput.input([fp1,fp2]) as lines: for line in lines: if fileinput.isfirstline(): print('\n=…
Python strip lstrip rstrip使用方法(字符串处理空格) strip是trim掉字符串两边的空格.lstrip, trim掉左边的空格rstrip, trim掉右边的空格 strip ( s [ , chars ] ) Return a copy of the string with leading and trailing characters removed. If chars is omitted or None , whitespace characters a…