stay Python in , There are several ways to write a path , Such as :( Everybody knows \n It means new line )
report_dir1=r‘C:\Local\Programs\Python\Python35\Lib\n_test’
report_dir2=‘C:\Local\Programs\Python\Python35\Lib\n_test’
report_dir3=‘C:/Local/Programs/Python/Python35/Lib/n_test’
The three paths are equivalent :
report_dir1 Add r after , So that the compiler will not ‘\n_test’ Medium “\n” As a newline character alone , But with the following “_test” As a whole .
report_dir2 All of them are \, The double slash is used because one of the backslashes means escape , So every one \ Are escaped to \.
report_dir3 Don't tell yourself .