Here's my problem; my code snippet reads a file(presumably an _io.readline, I'll question this later), with the file.readline(). The output shows individual characters being read and printed out followed by the "here" being printed. Also, see below.
Source data file: <!-- saved from url=(0040)https://finance.yahoo.com/portfolio/pf_2 --> html class="yui3-js-enabled" id="yui_3_10_3_4_1412203661632_7637"><div id="yui3-css-stamp" style="position: absolute !important; visibility: hidden !important" class=""></div><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> Code snippet: import re, os for line_in in file.readline(): print( line_in ) print("here") continue Output: < here ! here - here - here here s here a here v here e Why the individual characters and not the full line? Also, it is very unclear to me which readline I am using. I have imported os. I am using pycharm IDE and supposedly it will show me where readline is coming from by right clicking and choosing find usages. However, it brings up three readlines which are place holders. It doesn't bring up the os.readline. I am getting really tired of trying to figure out which function is being used! So, what is happening that I am missing? TIA, Clayton
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor