『Glob』常用方法记录

glob.glob(file)

返回匹配的文件

glob.glob(./flower_photos/tulips/*.jpg)

Out[1]:<br># ['./flower_photos/tulips/19425920580_cdc8f49aed_n.jpg', './flower_photos/tulips
/17094167287_865840060d_n.jpg', './flower_photos/tulips/8712282563_3819afb7bc.jpg',
'./flower_photos/tulips/7166606598_5d2cd307c3.jpg'']

 

posted @ 2017-08-24 10:53  叠加态的猫  阅读(379)  评论(0编辑  收藏  举报