Why does os.path.dirname() think file after double slash is a directory?

27 Views Asked by At

Function dirname from Python module os.path should return directory name, so why it does it return file name when we use doubleslash?

path = "/a.php"
dirname(path) # result is /

vs

path = "//a.php"
dirname(path) # result is //a.php
0

There are 0 best solutions below