A

Admin • 832.52K Points
Coach

Q. How to rename a file in Python?

  • (A) os.rename()
  • (B) os.move()
  • (C) renamefile()
  • (D) file.rename()
  • Correct Answer - Option(A)
  • Views: 18
  • Filed under category Python
  • Hashtags:

Explanation by: Admin

os.rename('old', 'new') renames a file in Python.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.