title: Unable to make a in place substitution with re.sub in Python
body: <p>I have a list, where each element of the list is the title of a chapter.
  Each title is formatted in the following way:
  '[Series name] [chapter number] : [chapter title]'
  So, an excerpt of my list would be</p>
  
  <pre><code>chapter_title:['One Piece 1 : Romance Dawn', 'One Piece 2 : They Call Him Strawhat Luffy', 'One Piece 3 : Pirate Hunter Zoro Enters']
  </code></pre>
  
  <p>I want to remove the space between the chapter number and the colon.
  My working code was:</p>
  
  <pre><code>no_space_regex = re.compile(r'\s:')
  for i in chapter_title:
      no_space_regex.sub(':',i)
  </code></pre>
  
  <p>However, it didn't make the substitution. Moreover, I know the compile works, because if I use re.findall it finds all the whitespaces followed by a colon.</p>
  
  <p>I kinda solved it, using:</p>
  
  <pre><code>no_space_regex = re.compile(r'\s:')
  def_chapter=[] #list of chapter titles with no space before :
  for i in chapter_title:
      i = no_space_regex.sub(':',i)
      def_chapter.append(i)
  </code></pre>
  
  <p>but I was wondering why re.sub did not substitute it in place, like it is supposed to.</p>