Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 289 Bytes

Read_and_Write_Files_in_Python.md

File metadata and controls

16 lines (13 loc) · 289 Bytes

Read and Write Files in Python

  • Open a File in read+ mode(Opens file for reading and writing)
   target=open('filename.txt','r+')
  • Print the file content
  print target.read()
  • Write content into the filename
  target.write("I m writing into the file \n")