Aug-28-2020, 10:02 PM
Most (all?) things in "os" are access to the operating system functions rather than implemented in python. So yes, you're correct.
unlink()
is the OS call to remove a file and it often fails when handed a directory. Python isn't really doing anything here other than handing the structure over to the OS and handing back any success/failure information.