我是一个蟒蛇新手,有一个难以解决的问题.
我有一个定义路径的字符串,所有空格都已转换为下划线.如何找到它是否与真实路径相对应?
例如一个像/some/path_to/directory_1/and_to/directory_2 真实路径的字符串:/some/path_to/directory 1/and_to/directory 2
/some/path_to/directory_1/and_to/directory_2
/some/path_to/directory 1/and_to/directory 2
注意真实路径可以包含两个空格和下划线.
我怎么能把它喂给os.path.exists()???
os.path.exists()
谢谢亚历山德罗
python path
path ×1
python ×1