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

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -