I am new to python with a problem that is hard to handle.
I have a line defining a path, all spaces have been converted to underscores. How can I find if it matches the real path?
eg. type string /some/path_to/directory_1/and_to/directory_2
with real path:/some/path_to/directory 1/and_to/directory 2
note that the real path may contain BOTH spaces and underscores.
How can i pass it os.path.exists()
thanks Alessandro
source
share