Read from a file in Python

Pubblicato il: 13 luglio 2022
sul canale di: Python Morsels
568
34

To work with a text file in Python, you can use the built-in open function, which gives you back a file object. Reading from and writing to text files is an important skill.

Read an article version of this video at https://pym.dev/how-read-text-file/

Find more Python screencasts at https://pym.dev/screencasts/

00:00 Opening and reading a text file in Python
00:40 Closing files manually using the close method
01:30 Using a with block to automatically close the file
02:26 Recap: use the open function and a "with" block to read from a file


In questa pagina del sito puoi guardare il video online Read from a file in Python della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Python Morsels 13 luglio 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 568 volte e gli è piaciuto 34 spettatori. Buona visione!