csv - ASCII files get erased after opening in Python -
i started learning python , came across of following problem open ascii fine reading, data.txt , try print screen. using code:
f = open("e:\ascii\data.txt", "r") line in f: print(repr(line))
this shows nothing on screen, , file gets erased of imformation contained, , gets 0kb of size. i'm using python 2.7.9 64-bit on pycharm. help!
not sure deletion, should print want
with open('e:\ascii\data.txt', 'r') f: line in f.read().splitlines(): print repr(line)
Comments
Post a Comment