title: Python: String manipulation function error, returns "None"
body: <p>I am currently having issues with string manipulation in Python. I am trying to create a function (called nameManipulate) where it finds the beginning of each word in the string and replaces it with "n" to work with later on in the program.
  I have no idea if there is a faster or more efficient method of doing this but here is mine (the random song is selected from an SQL database):</p>
  
  <pre><code>import sqlite3, random
  
  db = sqlite3.connect('songsdb')
  cursor = db.cursor()
  
  number = str(random.randint(1,50))
  
  cursor.execute('''
  SELECT songid,title,artist FROM songs WHERE songid='''+number+'''
  ''')
  all_rows = cursor.fetchall()
  for row in all_rows:
      songid = row[0] # Integer
      title = row[1] # String (song name)
      artist = row[2] # String (song artist)
  print(songid, title, artist)
  
  def nameManipulate(title):
      new_title = title
      for letter in range(len(title)):
          if title[letter] == " ":
              new_title = title.replace(str(title[letter+1]), "n")
      new_title = new_title.replace(str(title[0]), "n")
      return new_title
  
  displayTitle = str(nameManipulate(title))
  
  print(displayTitle)
  </code></pre>
  
  <p>The result prints the full data received by the database as expected, but it should also print the manipulated string, instead it simply prints "None".</p>
  
  <pre><code>37 Smells Like Teen Spirit Nirvana
  None
  </code></pre>
  
  <p>Instead of "nmells Like Teen npirit", it should have printed "nmells nike neen npirit"</p>
  
  <p>Any advice or help would be greatly appreciated, I would love to learn exactly what's gone wrong and how to fix it. Appreciated!</p>