Re: [Tutor] Removing Content from Lines....

2016-03-24 Thread Martin A. Brown
Greetings Sam, >Hello,I am hoping you experts can help out a newbie.I have written >some python code to gather a bunch of sentences from many files. >These sentences contain the content: > >blah blah blah blah 1-up printingblah blah blah blah >blah blah blah blah >blah blah Presetblah blah bla

Re: [Tutor] Simple game

2016-03-24 Thread Alan Gauld
On 24/03/16 18:12, Tom Maher wrote: > raw_input('your input ') Raw input returns a value, you need to store it somewhere like: value = raw_input('your input ') > while raw_input != 'c' or 'h' or 'l': Then you need to compare vale not the function name. (Did you learn BASIC at some point maybe?

Re: [Tutor] Removing Content from Lines....

2016-03-24 Thread Alan Gauld
On 24/03/16 21:03, Sam Starfas via Tutor wrote: > I have written some python code to gather a bunch > of sentences from many files. > These sentences contain the content: OK, They are presumably lines and not sentences. Lines end in a newline character and sentences end with a period. So they are

[Tutor] Simple game

2016-03-24 Thread Tom Maher
Here is a simple game I am trying to create: print "pick a number between 0 and 100 and tell me if it my guess is too high (h) too low (l) or correct (c)" guess = 0 print 'my guess is 50' raw_input('your input ') n = 50 while raw_input != 'c' or 'h' or 'l': if raw_input == 'h':

[Tutor] Removing Content from Lines....

2016-03-24 Thread Sam Starfas via Tutor
Hello,I am hoping you experts can help out a newbie.I have written some python code to gather a bunch of sentences from many files. These sentences contain the content: blah blah blah blah 1-up printingblah blah blah blah blah blah blah blah blah blah Presetblah blah blah blah blah blah blah P