美文网首页
三分钟热情自学 Python · 第13期 · 使用 Pytho

三分钟热情自学 Python · 第13期 · 使用 Pytho

作者: 游文影月志 | 来源:发表于2020-09-08 19:22 被阅读0次

    行到水穷处,坐看云起时。
    ——王维

    1. 前言

    在这个生活中处处都是大数据和人工智能的时代,总是能在各种角落看到 Python 的培训广告。我招架不住敌方的猛烈攻势,败下阵来。经过了一分钟的深思熟虑,我决定利用我的三分钟热情进行回击,从零开始自学 Python

    2.

    Chapter 10: Organizing Files

    第十章:整理文件

    2.1 The shutil Module

    The shutil module has functions to let you copy, move, rename, and delete files in your Python programs.

    在 Python 程序中,可以使用 shutil 模块复制移动重命名删除文件。

    2.1.1 shutil.copy(src, dest)

    Copy the file at the path src to the folder at the path dest. Both src and dest can be strings or Path objects. If dest is a filename, it will be used as the new name of the copied file. This function returns a string or Path object of the copied file.

    将路径 src 中的文件复制到路径 dest 目录下。参数 srcdest 既可以是字符串,也可以是 Path 对象。如果参数 dest 是文件名,它将作为复制得到的新文件的名称。本函数将会返回复制所得文件的路径字符串或 Path 对象。

    相关文章

      网友评论

          本文标题:三分钟热情自学 Python · 第13期 · 使用 Pytho

          本文链接:https://www.haomeiwen.com/subject/baujektx.html