your not saving values.strip()
you need to do this if your doing it that way...
you need to do this if your doing it that way...
values = values.strip()
>>> s = 'test\n' >>> s 'test\n' >>> s.strip() 'test' >>> s 'test\n' >>> s = s.strip() >>> s 'test'But i meant to do
cleanedData.append(datetime.strptime(values.strip(), '%d/%m/%Y %H:%M'))
Recommended Tutorials: