23. Python - Reading and Writing Files in Python

Publicado em: 24 Fevereiro 2024
no canal de: Neural Folk
7
0

The key function for working with files in Python is the open() function.
The open() function takes two parameters; filename, and mode.
There are four different methods (modes) for opening a file:

"r" - Read - Default value. Opens a file for reading, error if the file does not exist
"a" - Append - Opens a file for appending, creates the file if it does not exist
"w" - Write - Opens a file for writing, creates the file if it does not exist
"x" - Create - Creates the specified file, returns an error if the file exists

#python #pythonprogramming #pythontutorial #python3 #filesinpython #readingfilesinpython #writingfilesinpython #pythonfilereading #pythonfilewriting #creatingnewfileinpython #creatingnewfolderinpython #deletingfilesinpython #deletingfoldersinpython


Nesta página do site você pode assistir ao vídeo on-line 23. Python - Reading and Writing Files in Python duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Neural Folk 24 Fevereiro 2024, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 7 vezes e gostou 0 espectadores. Boa visualização!