September 2026
1051 pages
35h 4m
English
If you recall the examples from the previous chapters, you will notice that we have already worked with file paths in a wide variety of applications, often to access files for reading or writing. We represented file paths as strings:
>>> d = "/this/is/my/file.txt"
This approach is legitimate and very common. All common functions in the standard library that expect file paths as arguments support them in the form of a string. However, this type of representation also leads to specific problems:
The different representations of file paths in different operating systems makes it difficult to write cross-platform code.
Comparing two file paths represented as strings is difficult because there are sometimes ...
Read now
Unlock full access