We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
this is my code
f = open("demofile.txt","r")
print(f.read ())
output
C:\Users\My Name>python demo_file_open.py Hello! Welcome to demofile.txt This file is for testing purposes. Good Luck!
f = open("demofile.txt","r") print(f.read(50))
C:\Users\My Name>python demo_file_open.py Hello!
f = open("demofile.txt", "r")
print(f.readline()) print(f.readline())
C:\Users\My Name>python demo_file_open.py
Hello! Welcome to demofile.txt
f = open("demofile.txt","r" ) for a in f: print(a)
f = open("demofile.txt","r") print(f.readline()) f.close()
f = open("demofile2.txt","a") f.write("Now the file has more content!") f.close()
f = open("demofile2.txt","r") print(f.read())
Now the file has more contentNow the file has more content!
f = open("demofile3.txt","w") f.write("i have deleted the content") f.close() f = open("demofile3.txt","r") print(f.read())
output i have deleted the content
f = open("demofile.txt","r") print(f.read(5))
C:\Us
The text was updated successfully, but these errors were encountered:
No branches or pull requests
this is my code
f = open("demofile.txt","r")
print(f.read ())
output
C:\Users\My Name>python demo_file_open.py
Hello! Welcome to demofile.txt
This file is for testing purposes.
Good Luck!
f = open("demofile.txt","r")
print(f.read(50))
output
C:\Users\My Name>python demo_file_open.py
Hello!
f = open("demofile.txt", "r")
print(f.readline())
print(f.readline())
output
C:\Users\My Name>python demo_file_open.py
Hello! Welcome to demofile.txt
f = open("demofile.txt","r" )
for a in f:
print(a)
output
C:\Users\My Name>python demo_file_open.py
Hello! Welcome to demofile.txt
This file is for testing purposes.
Good Luck!
f = open("demofile.txt","r")
print(f.readline())
f.close()
output
C:\Users\My Name>python demo_file_open.py
f = open("demofile2.txt","a")
f.write("Now the file has more content!")
f.close()
f = open("demofile2.txt","r")
print(f.read())
output
Now the file has more contentNow the file has more content!
f = open("demofile3.txt","w")
f.write("i have deleted the content")
f.close()
f = open("demofile3.txt","r")
print(f.read())
output
i have deleted the content
f = open("demofile.txt","r")
print(f.read(5))
output
C:\Us
The text was updated successfully, but these errors were encountered: