Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NameError: name 'string' is not defined in 05_dictionaries.html #4

Open
hexagonrecursion opened this issue Feb 14, 2022 · 0 comments
Open

Comments

@hexagonrecursion
Copy link

The html version of you book contains an exception where an output is expected:

https://allendowney.github.io/ElementsOfDataScience/05_dictionaries.html#punctuation

After the paragraph "Here’s what happens when we try to remove the punctuation"

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-2-28f1a7003571> in <module>
      1 for word in line.split():
----> 2     word = word.strip(string.punctuation)
      3     print(word)

NameError: name 'string' is not defined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant