Answer to Question #231135 in Python for Shreya

Question #231135
Write a function in PYTHON to add new record at the bottom of a file “STUDENT”
1
Expert's answer
2021-09-06T23:58:32-0400
def write_bottom(txt_file, neccessary_string:str):
  file_object = open(txt_file, 'a')
   
  # Append neccessary_string at the end of file
  file_object.write(neccessary_string)
   
  # Close the file
  file_object.close()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS