How to read a file in python
Answers
Answered by
0
Answer:
- Python allows you to read, write and delete files.
- Use the function open("filename","w+") to create a file. ...
- To append data to an existing file use the command open("Filename", "a")
- Use the read function to read the ENTIRE contents of a file.
- Use the readlines function to read the content of the file one by one.
Answered by
0
Answer:
file=open("c:\\python programs\\test.txt","r")
doc=file.read()
Explanation:
Mark me as a BRAINLIST plzzz
Similar questions
Math,
6 months ago
Social Sciences,
6 months ago
Computer Science,
6 months ago
Math,
11 months ago
Geography,
11 months ago
Social Sciences,
1 year ago