Aug-23-2019, 02:51 PM
hi i'm current reading python crash course and it says that under unix-like platforms I have to use forward-slash like this:
with open('text_files/filename.txt') as file_object:and under windows operating systems i have to use back-slash like this:
with open('text_files\filename.txt') as file_object:but what if i wanted to create a multi-platform script? is there a universal way of writing file/folder paths?