i need to import a file into an array. The file is like this
2017-12-21T14:49:17.518Z
2017-12-21T14:50:49.723Z
2017-12-21T14:50:54.028Z
2017-12-21T14:50:54.343Z
2017-12-21T14:50:59.084Z
2017-12-21T14:50:59.399Z
2017-12-21T14:51:04.142Z
2017-12-21T14:51:04.457Z
2017-12-21T14:51:09.204Z
2017-12-21T14:51:09.521Z
2017-12-21T14:51:14.261Z
2017-12-21T14:51:14.579Z
2017-12-21T14:51:19.326Z
2017-12-21T14:51:19.635Z
2017-12-21T14:51:24.376Z
2017-12-21T14:51:24.691Z
2017-12-21T14:51:29.435Z
2017-12-21T14:51:29.750Z
2017-12-21T14:51:34.498Z
2017-12-21T14:51:34.813Z
2017-12-21T14:51:39.553Z
2017-12-21T14:51:39.868Z
2017-12-21T14:51:44.612Z
2017-12-21T14:51:44.927Z
2017-12-21T14:51:49.675Z
2017-12-21T14:51:49.990Z
2017-12-21T14:51:54.738Z
2017-12-21T14:51:55.042Z
. and i need to import it into a list like this
times = [
'2017-12-21T14:49:17.518Z',
'2017-12-21T14:50:49.723Z',
'2017-12-21T14:50:54.028Z',
'2017-12-21T14:50:54.343Z',
'2017-12-21T14:50:59.084Z',
'2017-12-21T14:50:59.399Z',
'2017-12-21T14:51:04.142Z',
'2017-12-21T14:51:04.457Z',
'2017-12-21T14:51:09.204Z',
'2017-12-21T14:51:09.521Z',
'2017-12-21T14:51:14.261Z',
'2017-12-21T14:51:14.579Z',
'2017-12-21T14:51:19.326Z',
'2017-12-21T14:51:19.635Z',
'2017-12-21T14:51:24.376Z',
'2017-12-21T14:51:24.691Z',
'2017-12-21T14:51:29.435Z',
'2017-12-21T14:51:29.750Z',
'2017-12-21T14:51:34.498Z',
'2017-12-21T14:51:34.813Z'
]
Now, i don't know what am doing wrong, i used the code
times = []
impo= open('checck.txt','r')
for line in impo.readline():
times.append(line)
but am not getting that, i tried to export it using
joinliens = ''.join(times)
open('ext.txt', 'w').write(joinliens)
but i couldn't get the list am expacting. in the command line, if i print out, i get soemthing close,but i can't export that