Basic Programming 9 - Aggregate Words to Single Document
Download the example text directory from Canvas. Read all text files in the directory. Write a program to save words and their counts aggregated across all these text files to ''. hint: after download the zipped file, extract it to a directory, your program first needs to list all files in a directory ( files-in-a-directory-in-python 2) Then, you may use file read method (section 7.4 in Python book) to read content from each file. use late() method to replace punctuations as shown on page 116 of the Python book ", uation)) line = line. translate(rans('', line = () words = ()
Livre connecté
École, étude et sujet
Infos sur le Document
- Publié le
- 1 août 2021
- Nombre de pages
- 2
- Écrit en
- 2021/2022
- Type
- AUTRE
- Personne
- Inconnu