PYTHON CIRCLE
Practice
Python Books
Archive
Subscribe
Login
Menu
Login
Practice
Python Books
Archive
Subscribe
Blog available for sell
This blog is available for sale. Please 'contact us' if interested.
Advertise with us
Python Multiple Choice Questions
How do you rename a file?
A. fp.name = 'new_name.txt'
B. os.rename(existing_name, new_name)
C. os.rename(fp, new_name)
D. os.set_name(existing_name, new_name)
Show Answer
Next Question
Correct Answer:
B
Explanation: os.rename() is used to rename files.
© 2024-2025 Python Circle
Contact
Sponsor
Archive
Sitemap