[Tutor] String method "strip()" not working

2015-03-07 Thread Akash Shekhar
I am trying to learn how to use strip() method. It is supposed to cut out all the whitespace as I read in the tutorial. But the code is not working. Here's my code: sentence = "Hello, how are you?" > > >> print(sentence) > > >> print(sentence.strip()) > > >> input("\n\nPress enter key to exit.")

Re: [Tutor] Beautiful Soup

2006-11-29 Thread Akash
> Beautiful Soup can also extract text which is present on the page. If there are no complete links no library can do that for you. But since you are reaching a certain web page to extract you already have that URL information with you. All you have to do then is to prefix it to each extra

Re: [Tutor] How do I make Python read a string character by character?

2006-08-23 Thread Akash
On 8/24/06, Nathan Pinno <[EMAIL PROTECTED]> wrote: > How do I make Python read a string character by character? >>> str = 'string' >>> for i in range(0, len(str)): ... print str[i] ... s t r i n g just take care abou