Easiest way to rm -rf in Python

前端 未结 7 1551
忘了有多久
忘了有多久 2020-12-08 12:44

What is the easiest way to do the equivalent of rm -rf in Python?

7条回答
  •  有刺的猬
    2020-12-08 13:28

    shutil.rmtree() is right answer, but just look at another useful function - os.walk()

提交回复
热议问题