Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 371 Bytes

104.md

File metadata and controls

22 lines (17 loc) · 371 Bytes
@author jackzhenguo
@desc 
@date 2019/10/3

104 获取路径中的文件名

In [11]: import os
    ...: file_ext = os.path.split('./data/py/test.py')
    ...: ipath,ifile = file_ext
    ...:

In [12]: ipath
Out[12]: './data/py'

In [13]: ifile
Out[13]: 'test.py'
[上一个例子](103.md) [下一个例子](105.md)