I am new to Python, I have list l with 8th element like this, I want this to be compared with, Coding like this. Can some body let me know, is this right way of comparing string to time format?
>>> l[7]
'07APR2015'
>>> import time
>>> td= time.strftime('%Y%m%d')
>>> td
'20170227'
>>> l[7]>td
False
>>> l[7]<td
True
>>> tt ='02APR2015'
>>> tt > td
False
>>> tt < td
True
If not, please suggest me in conversion.
Thanks for the help.