Domain Name Forum

Domain Name Forum (http://www.domainnameforum.org/index.php)
-   Python (http://www.domainnameforum.org/forumdisplay.php?f=138)
-   -   How to handle end-of-line characters (http://www.domainnameforum.org/showthread.php?t=150912)

Python 03-20-2011 05:13 PM

How to handle end-of-line characters
 
I am trying to read from a txt file and counts the number of times each word appears. The problem is that it counts the EOL characters as well. I tried to use the rstrip, still it didn't do anything. So how can I handle these end-of-line characters? Please help. <div class="codeblock">


All times are GMT -4. The time now is 11:45 AM.

Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.