McqMate
| Q. |
Is it possible to create a text file in python? |
| A. | yes |
| B. | no |
| C. | machine dependent |
| D. | all of the mentioned |
| Answer» A. yes | |
| Explanation: yes we can create a file in python. creation of file is as shown below. file = open(“newfile.txt”, “w”) file.write(“hello world in the new file\n”) file.write(“and another line\n”) file.close(). | |
View all MCQs in
Problem Solving and Python ProgrammingNo comments yet