Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

Read and Write File using Python in OnlineGDB

+2 votes
asked Jan 7, 2019 by Sabbaticaler (140 points)
retagged Jan 7, 2019 by Sabbaticaler
Hi,

I'm new to onlinegdb. I would like to read and write file using python 3 in onlinegdb. The question : where do I put the file(s) ? in my local harddisk or in onlinegdb ? ... example(s) will be very appreciated.

Thanks !

1 Answer

+1 vote
answered Feb 5 by Nando Abreu (930 points)

Left from "Run icon" is "New file".

To read files, you will have to create them in GDB before calling from your script.

When writing to a file, GBD will place the new file for you there.

Try this to understand: https://onlinegdb.com/H1LEIUPfU

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