how to run python file handling program in online editor?

+5 votes
asked Jul 10, 2019 by anonymous
how to execute the python file handling programs through on line python compiler

1 Answer

0 votes
answered Aug 6, 2019 by (300 points)

Create a new file named some_file.txt and enter some text in that file. When you save it, it will ask for Project Name. I entered project name as File, you can name it accordingly.

Then, in file, write the code given below:

f=open("some_file.txt", "r")

Now, click on Run button.

In terminal, it will display the text written in some_file.txt file.

I am unable to attach screenshot. But, if you face any problem, then just ask

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.