Answer to Question #231118 in Python for Rachna Pal

Question #231118

Write a function in PYTHON to add new record at the bottom of a file “STUDENT”


1
Expert's answer
2021-08-31T17:36:14-0400
filename="example_file.txt"


file = open(filename, 'a')


for i in range(0, 5):
    name = input ("Enter a name: ")
    file.write(name + "\n")


file.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