Script:
Run:
Notes:
- There is no process to create the file, because I create a file using the echo in powershell in after, and then run Python will prompt an error.
This error is because the encoding format file is not UTF-8, I use notepad ++ to write, it is necessary to select a coding toolbar, and then choose to use UTF-8 encoding enough. - Exits judge whether a file exists, if there is, returns True, does not exist, it returns False.
- len () Returns a string length as a numerical value.