Python Forum
Where did this dictionary come from?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Where did this dictionary come from?
#2
as described in the docs for str.maketrans() method:
Quote:If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
in this particular case the first and second argument are irrelevant - the goal is to map all punctuation chars to None. The numbers (the keys) are Unicode ordinals for punctuation chars
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
Where did this dictionary come from? - by Mark17 - Sep-23-2019, 03:47 PM
RE: Where did this dictionary come from? - by buran - Sep-23-2019, 04:13 PM
RE: Where did this dictionary come from? - by buran - Sep-23-2019, 06:31 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020