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.
Login
Login
OnlineGDB Q&A
Questions
Unanswered
Tags
Ask a Question
Ask a Question
how to call and open a file in python ?
+1
vote
asked
Sep 30, 2022
by
jerome
(
130
points)
callfile
Please
log in
or register to answer this question.
3 Answers
0
votes
answered
Oct 2, 2022
by
Peter Minarik
(
101,360
points)
Does this help?
https://www.w3schools.com/python/python_file_handling.asp
Please
log in
or register to add a comment.
0
votes
answered
Oct 4, 2022
by
dsa learner
(
260
points)
use
f =open("File path", "r") - if your file is in the same folder as this code then write 'filename.extension
else write full path
print(f.read)
Please
log in
or register to add a comment.
+1
vote
answered
Oct 4, 2022
by
codenxn
(
1,530
points)
with open("File path") as file:
print(file.read())
Hope that helps!
Please
log in
or register to add a comment.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...