A collection of data or information kept on a computer is a file. Among the many file types, you are used to are text, audio, and video files. Hence, Python makes it simple to change these files. Text and binary files are the two main types of files.