from pathlib import Path for filename in Path('src').rglob('*.c'): print(filename). 如果您需要一个列表,只需使用 recursive 而不是 os.walk .
確定! 回上一頁