Python join拼接
import os print(os.path.join("I","love","you.")) # /XXX 代表的是绝对路径 这个变量之前不进行拼接 print(os.path.join("I","\love","you.")) # 拼接是以反斜杠 \ 来的 # .\ 暂时不知道啥意思 但是 好像是和. 相互抵消 print(os.path.join("I",".\love","you."))
截图:

import os print(os.path.join("I","love","you.")) # /XXX 代表的是绝对路径 这个变量之前不进行拼接 print(os.path.join("I","\love","you.")) # 拼接是以反斜杠 \ 来的 # .\ 暂时不知道啥意思 但是 好像是和. 相互抵消 print(os.path.join("I",".\love","you."))
截图:
