Iterate over Python list and convert Python date to human readable string
<p>I have a python list that stores IP addresses, hostnames and dates.</p>

<p>I need to iterate over this list and convert the python dates to human readable dates.</p>

<p>How can I iterate over the list and convert the dates to human readable strings?</p>

<p>List:</p>

<pre><code>{'_id': '192.168.1.5', '192.168.1.5', 'u_updated_timestamp': datetime.datetime(2016, 9, 1, 20, 27, 38, 364000), 'u_hostname': 'test.example.com'}, {'_id': '192.168.1.3', 'u_ipv4': '192.168.1.3', 'u_updated_timestamp': datetime.datetime(2016, 9, 2, 9, 40, 5, 347000), 'u_hostname': test.test.com}, {'_id': '192.168.1.8', 'u_ipv4': '192.168.1.8', 'u_updated_timestamp': datetime.datetime(2016, 9, 2, 13, 13, 5, 403000), 'u_hostname': hosttest.example.com}
</code></pre>

<p>If those are real python datetime.date objects you can simply call</p>

<pre><code>date.isoformat()
</code></pre>

<p>This should return '2016-26-09' (today).
Your 'list' does not look like a list tho...</p>

python