#check if is converted to string or not if ( = )print('decoding successful!'elseprint('decoding unsuccessful!'decoding successfulfile / operating systems represents files as sequence of bytesnot text file is named location on disk to store related information it is used to permanently store data in your disk in pythona file operation takes place in the following order open file read or write onto file (operationclose the file python wraps the incoming (or outgoingstream of bytes with appropriate decode (or encodecalls so we can deal directly with str objects opening file python has built-in function open(to open file this will generate file objectalso called handle as it is used to read or modify the file accordingly open( ' :\users\rajesh\desktop\index webm','rb' mode 'rbf name ' :\\users\\rajesh\\desktop\\index webmfor reading text from filewe only need to pass the filename into the function the file will be opened for readingand the bytes will be converted to text using the platform default encoding