In Python, it is a common scenario that the files we want to work with should be placed in the same folder as the script itself. Simply we with the reference of a filename like "data.txt" may not always work as expected, especially when the script is executed from a different working directory.