You can specify the mode while opening a file. In mode, you can specify whether you want to read ‘r’ , write ‘w’ or append ‘a’ to the file. You can also specify “text or binary” in which the file is to be opened. The default is reading in text mode. In this mode, while reading from the file the data w’ould . be in the format of strings.