title: How to convert `ctime` to `datetime` in Python?
body: <pre><code>import time
  t = time.ctime()
  </code></pre>
  
  <p>For me at the moment, <code>t</code> is <code>'Sat Apr 21 11:58:02 2012'</code>. I have more data like this.</p>
  
  <p><strong>My question is:</strong> </p>
  
  <ul>
  <li>How to convert <code>t</code> to <code>datetime</code> in Python? Are there any modules to to it?</li>
  </ul>
  
  <p>I tried to make a time <code>dict</code> and then convert <code>t</code>, but feel like that’s not the best way to do it in Python. </p>
  
  <p><strong>Details:</strong> </p>
  
  <ul>
  <li>I have a <code>ctime</code> list (like <code>['Sat Apr 21 11:56:48 2012', 'Sat Apr 21 11:56:48 2012']</code>). </li>
  <li>I want to convert the contents to <code>datetime</code>, then store that in a <code>db</code> with <code>timestamp</code>.</li>
  </ul>