Python for Data Science: A step-by-step Python Programming Guide to Master Big Data, Analysis, Machine Learning, and Artificial Intelligence by Brogan Oscar

Python for Data Science: A step-by-step Python Programming Guide to Master Big Data, Analysis, Machine Learning, and Artificial Intelligence by Brogan Oscar

Author:Brogan, Oscar [Brogan, Oscar]
Language: eng
Format: epub
Published: 2020-03-10T16:00:00+00:00


Python Built-in File Methods

Python also supports a large number of built-in methods that can be used on file objects that are listed in the table below:

Method Description

close () Will close the file

detach () Will result in a separate raw stream.

fileno () Will result in a number representing the stream, per the operating system processing.

flush () Will flush the internal buffer.

isatty () Will result in determination if the file stream is interactive.

read () Will result in the content of the file.

readable () Will result in determination if the file stream is readable or not.

readline () Will result in one line from the file.

readlines () Will result in a list of lines from the file.

seek () Will modify the position of the file.

seekable () Will result in determination if the file permits modification of its position.

tell () Will result in the current position of the file.

truncate () Will change the size of the file to the indicated value.

writeable () Will result in determination if the file permits writing over.

write () Will write the indicated string to the file.

writelines () Will writes a list of strings to the file.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.