Computer Science, asked by pacrat5698, 11 months ago

How to open a file just to read in python?

Answers

Answered by susanthgarikena
0

Answer:

1.Python allows you to read, write and delete files.

2.Use the function open("filename","w+") to create a file. ...

3.To append data to an existing file use the command open("Filename", "a")

4.Use the read function to read the ENTIRE contents of a file.

5.Use the readlines function to read the content of the file one by one

Explanation:

Similar questions