已知在D.Python目录下有一个test.dat文件,则下列选项中返回True的是()。
已知在D.\Python目录下有一个test.dat文件,则下列选项中返回True的是()。
A.os.path.isfile('D.\\Python\\test.dat')
B.os.path.isdir('D.\\Python')
C.os.path.exists('D.\\Python')
D.os.path.exists('D.\\Python\\test.dat')
正确答案:os.path.isfile('D.\\Python\\test.dat');os.path.isdir('D.\\Python');os.path.exists('D.\\Python');os.path.exists('D.\\Python\\test.dat')