title: AttributeError references a non imported package
body: <p>I'm a beginner in python and I am running into the following problem, it's driving me nuts. </p>
  
  <p>I'm trying to subtract two dates using the datetime package but one of the 2 dates is a string value given by the user via an <code>input()</code> and the other one is a date given by <code>datetime.date.today()</code>.</p>
  
  <p>So I use <code>datetime.strptime(answer, '%Y-%m-%d').date()</code> to convert the string value into a date, I then do the subtraction I wanted to do and print the result, but it looks like this: <code>15 days, 0:00:00</code>.</p>
  
  <p>I wanted to remove , <code>0:00:00</code> so I tried to use the <code>.replace()</code> function to remove it but when I ran the code I got this error back:<code>AttributeError: 'datetime.timedelta' object has no attribute 'replace'</code>.</p>
  
  <p>I have imported the timedelta module at some point but I didn't need it in the end so I removed the line of code where I imported it. I don't understand why I still get an error that references timedelta.</p>
  
  <p>Could anyone explain to me what is happening ? And possibly how to solve the problem ? Thank you very much !</p>
  
  <p>I've already tried using <code>del timedelta</code> and rewriting my code in a new file and a new directory and even in another IDE but the error never goes away.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>import datetime
  
  current_date = datetime.date.today()
  answer = input('Enter a date (yyyy-mm-dd): ')
  
  from datetime import datetime
  
  new_end_date = datetime.strptime(answer, '%Y-%m-%d').date()
  days_added = new_end_date - current_date
  
  
  print(type(days_added))
  print(days_added.replace(', 0:00:00', ''))
  </code></pre>