Difference: EmilyDickinsonExperiment (2 vs. 3)

Revision 32018-10-02 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="IntroToCSF2018"

Emily Dickinson Experiment

Line: 10 to 10
  2. Use the code from #1 to count the "was", and "was,". Why is there a difference? Consider the code below:
Changed:
<
<

<-- SyntaxHighlightingPlugin -->
<br />def removePunctuation(s):<br />  import string<br />  for c in string.punctuation:<br />    s= s.replace(c,"")<br />  return s<br />
<-- end SyntaxHighlightingPlugin -->
>
>

<-- SyntaxHighlightingPlugin -->
def removePunctuation(s):
  import string
  for c in string.punctuation:
    s= s.replace(c,"")
  return s
<-- end SyntaxHighlightingPlugin -->
  What does this do? Call this on every line and search for "was" now?
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback