UNIX absolute path starts with ‘/’, whereas Windows starts with alphabet ‘C:’ or ‘\’.
Does python have a standard function to check if a path is absolute or relative?
UNIX absolute path starts with ‘/’, whereas Windows starts with alphabet ‘C:’ or ‘\’.
Share
os.path.isabsreturnsTrueif the path is absolute,Falseif not. The documentation says it works in windows (I can confirm it works in Linux personally).