stream io introduction in this we will explore the stream / model that under pins the way in which data is read from and written to data sources and sinks one example of data source or sink is file but another might be byte array this model is actually what sits underneath the file access mechanisms discussed in the previous it is not actually necessary to understand this model to be able to read and write data to and from filehowever in some situations it is useful to have an understanding of this model so that you can modify the default behaviour when necessary the remainder of this first introduces the stream modeldiscusses python streams in general and then presents the classes provided by python it then considers what is the actual effect of using the open(function presented in the last what is streamstreams are objects which serve as sources or sinks of data at first this concept can seem bit strange the easiest way to think of stream is as conduit of data flowing from or into pool some streams read data straight from the "source of the dataand some streams read data from other streams these latter streams then do some "usefulprocessing of the data such as converting the raw data into specific format the following figure illustrates this idea (cspringer nature switzerland ag huntadvanced guide to python programmingundergraduate topics in computer science