Introduction to Write or Read Data


☞ To write data on the any file, follow the steps.

1. Open the file
2. Write in the file(process the data)
3. Close the file

☞ To write data on the text file, binary file and csv file, following functions can be used :

Text FileBinary FileCSV File
1. write()
2. writelines()
1. dump()
1. writerow()
2. writerows()

☞ To read data on the any file, follow the steps.

1. Open the file
2. Read from the file(process the data)
3. Close the file

☞ To read data on the text file, binary file and csv file, following functions can be used :

Text FileBinary FileCSV File
1. read()
2. readline()
3. readlines()
1. load()
1. reader()