📅  最后修改于: 2022-03-11 14:45:31.590000             🧑  作者: Mango
import os.path
path = os.getenv('HOME') + '/python'
num_files = len([f for f in os.listdir(path)if os.path.isfile(os.path.join(path, f))])