title: Changing parts of a string with '#'
body: <p>Wanted to see if I'm going in the right direction. I have to change everything but the last four characters of a string into #. I've got two ideas so far.</p>
  
  <p>First one:</p>
  
  <pre><code>def maskify(cc):
     cc = raw_input("Enter passcode: ")
     n = len(cc)
     cc.replace(cc[0:n-4], #)  # this one gives me the unexpected EOF while parsing error
  </code></pre>
  
  <p>Second one (I think this one's closer because it supposedly needs an algorithm):</p>
  
  <pre><code>def maskify(cc):
     cc = raw_input("Enter passcode: ")  
     n = len(cc)
     for i in range (0, n-4):  # i think a for loop would be good but i don't know how i'm going to use it yet
        cc.replace(                  #not entirely sure what to put here
     pass                           
  </code></pre>