Created
April 19, 2020 06:16
-
-
Save Deep18-03/f23fcf8febfc6477b77da6fee6dc1c8f to your computer and use it in GitHub Desktop.
file IO concept
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f=open("deep.txt") | |
#content=f.read() #it will read whole file content | |
#print(content) | |
print(f.readline()) #it will read only first line | |
print(f.readlines()) #it will read file in list |
also close the file
f.close()
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
create a txt file having name deep.txt