10.文件操作

import os # __file__ print("文件绝对路径(含文件名)",__file__) # os.getcwd() print("获取绝对路径(不含文件名)",os.getcwd()) # os.path.abspath(path) print("获取相对路径的绝对路径",os.pa
posted @ 2024-05-10 00:27  jason8826  阅读(3)  评论(0编辑  收藏  举报