📜  在 python 代码示例中创建数据目录

📅  最后修改于: 2022-03-11 14:46:54.309000             🧑  作者: Mango

代码示例1
import os

# define the name of the directory to be created
path = "/tmp/year"

try:
    os.mkdir(path)
except OSError:
    print ("Creation of the directory %s failed" % path)
else:
    print ("Successfully created the directory %s " % path)