简单小例子,拷贝文件读输入
程序员文章站
2022-05-10 17:46:43
...
import shutil class PrintClass: def __init__(self): pass def printS(self, s): print (s) def copyFile(self): shutil.copyfile("D:\\workspace\\file1.txt", "D:\\workspace\\file2.txt") if __name__ == '__main__': p = PrintClass() p.copyFile() x=int(input("Please enter an integer:"))#获取行输入 if x>0: print ('正数') elif x==0: print ('零') else: print ('负数')
下一篇: dwr