File Path PPS Abhishek
File Path PPS Abhishek
A file path is the location or address of a file/folder in the computer system. It tells the system where to find or save a file.
1. Absolute Path
2. Relative Path
1. Absolute Path
Examples:
Windows: C:/Users/Abhishek/Documents/data.txt
Linux: /home/abhishek/documents/data.txt
In Python:
file = open("C:/Users/Abhishek/Documents/data.txt", "r")
2. Relative Path
Example:
files/data.txt
In Python:
file = open("files/data.txt", "r")
Comparison Table
Summary