Scanning a file character by character
spacebar265 at gmail.com
Tue Feb 10 04:10:28 CET 2009
On Feb 9, 5:13 pm, Steve Holden <st... at holdenweb.com> wrote:
> Spacebar265 wrote:
> > On Feb 7, 2:17 am, Jorgen Grahn <grahn+n... at snipabacken.se> wrote:
> >> On Wed, 4 Feb 2009 22:48:13 -0800 (PST), Spacebar265 <spacebar... at gmail.com> wrote:
> >>> Hi. Does anyone know how to scan a filecharacterbycharacterand
> >>> have eachcharacterso I can put it into a variable. I am attempting
> >>> to make a chatbot and need this to read the saved input to look for
> >>> spelling mistakes and further analysis of user input.
> >> That does not follow. To analyze a text, the worst possible starting
> >> point is one variable for eachcharacter(what would you call them --
> >> character_1, character_2, ... character_65802 ?)
> I believe most people would read the input a line at a time and split
> the lines into words. It does depend whether you are attempting
> real-time spelling correction, though. That would be a different case.
> Steve Holden +1 571 484 6266 +1 800 494 3119
> Holden Web LLC http://www.holdenweb.com/
Thanks. How would I do separate lines into words without scanning one
character at a time?
More information about the Python-list