Programming and Problem Solving through Python : File Processing in Python

फ़ाइल का नाम बदलने के लिए प्रयुक्त सिंटैक्स: , The syntax used to rename a file :

The syntax used to rename a file :




Solution
A. os.rename(existing_name, new_name)



Explanation
os.rename(existing_name, new_name) function is used to rename file. Example: import os os.rename("a.txt","b.txt") hear this code rename the a.txt to b.txt
CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Exam Quiz Website development Company in Allahabad