Skip to content

Instantly share code, notes, and snippets.

@Deep18-03
Created April 19, 2020 06:16
Show Gist options
  • Save Deep18-03/f23fcf8febfc6477b77da6fee6dc1c8f to your computer and use it in GitHub Desktop.
Save Deep18-03/f23fcf8febfc6477b77da6fee6dc1c8f to your computer and use it in GitHub Desktop.
file IO concept
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
@Deep18-03
Copy link
Author

create a txt file having name deep.txt

@Deep18-03
Copy link
Author

also close the file
f.close()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment