二手产品经理

二手产品经理

THIS IS RENO

os functions - 55 days - Learn Python online for 100 days

Record#

  1. Today I learned about operating system functions.
  2. os.os.listdir() reads directories.
  3. os.mkdir("Hello") creates a directory.
  4. os.rename() renames files.
  5. os.popen(f"cp to.do backup/{bkname}") is a copy command. ChatGPT says this function is deprecated, and the latest one is subprocess.run(["cp", "to.do", f"backups/{name}"]).
  6. Today's exercise is to modify the code for day 51 and add a behavior to save to a specified directory with a random file name before automatic saving.

CODE#

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.