title: How to solve a problem with time in Python
body: <p>I have such a problem. I have a code:</p>
  <pre><code>def send_output(self):
  return list(map(&quot;Printer - {}&quot;.format, self.Product))
  </code></pre>
  <p>And it shows me:</p>
  <pre><code>Printer - Canon
  Printer - Lexmark
  Printer - HP
  etc...
  </code></pre>
  <p>I'd like this code to show me the same infos, but with <em>present time</em> like below:</p>
  <pre><code>Printer - Canon - 21:17:07
  Printer - Lexmark - 21:17:09
  Printer - HP - 21:17:14
  etc...
  </code></pre>
  <p>I was trying to use <strong>strftime('%H:%M:%S')</strong> somehow...</p>
  <p>I added at the begining:</p>
  <pre><code>from time import strftime
  </code></pre>
  <p>and also</p>
  <pre><code>self._time = strftime('%H:%M:%S')
  </code></pre>
  <p>and put it into my code like that:</p>
  <pre><code>def send_output(self):
  return list(map(&quot;Printer - {} - {}&quot;.format, self.Product, self._time))
  </code></pre>
  <p>But it doesn't show me all informations I want. Can anybody help me?</p>