import datetime
a=[datetime.datetime(2014, 4, 13, 0, 0), u'a', u'b', u'c',datetime.datetime(2014, 4, 14, 0, 0), u'a', u'b', u'c', datetime.datetime(2014, 4, 15, 0, 0), u'a', u'b', u'c']
How do I pull all of the dates out of this list?
I can always loop through and test. But how do I do it better?
I can use regex, like I did here python regular expression, pulling all letters out. But I know there are much more efficient ways.
I looked through here https://docs.python.org/2/library/stdtypes.html but it doesn't seem like the datetime
object is a built-in type. So I guess I can't go that route. Other suggestions please.
note: I don't know if the date will be every 4th value. I need something irregardless of pattern.