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)
This question was addressed to me in an online quiz.
This question is from Files in chapter Regular Expressions and Files of Python