Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
7
Task/Rename-a-file/Python/rename-a-file-1.py
Normal file
7
Task/Rename-a-file/Python/rename-a-file-1.py
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import os
|
||||
|
||||
os.rename("input.txt", "output.txt")
|
||||
os.rename("docs", "mydocs")
|
||||
|
||||
os.rename(os.sep + "input.txt", os.sep + "output.txt")
|
||||
os.rename(os.sep + "docs", os.sep + "mydocs")
|
||||
7
Task/Rename-a-file/Python/rename-a-file-2.py
Normal file
7
Task/Rename-a-file/Python/rename-a-file-2.py
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import shutil
|
||||
|
||||
shutil.move("input.txt", "output.txt")
|
||||
shutil.move("docs", "mydocs")
|
||||
|
||||
shutil.move("/input.txt", "/output.txt")
|
||||
shutil.move("/docs", "/mydocs")
|
||||
Loading…
Add table
Add a link
Reference in a new issue