taking a character input in python from a file?
Posted
by mekasperasky
on Stack Overflow
See other posts from Stack Overflow
or by mekasperasky
Published on 2010-05-03T21:12:01Z
Indexed on
2010/05/03
21:18 UTC
Read the original article
Hit count: 208
python
in python , suppose i have file data.txt . which has 6 lines of data . I want to calculate the no of lines which i am planning to do by going through each character and finding out the number of '\n' in the file . How to take one character input from the file ? Readline taken the whole line .
© Stack Overflow or respective owner