[Tutor] Scraping Wikipedia Table (The retruned file is empty)

Mark Lawrence breamoreboy at yahoo.co.uk
Fri Oct 23 19:15:02 EDT 2015


On 23/10/2015 03:31, Danny Yoo wrote:
> On Thu, Oct 22, 2015 at 4:01 PM, Cynthia Alice Andrews
> <the.cynthia.andrews at gmail.com> wrote:
>> At this point I feel like I am wasting my time by not asking for help. I
>> can't figure out why the file keeps coming back empty. There are no error
>> message, just an empy file. Very frustrating.
>
>
> Looking more at the code...
>
>      > for x in range(len(drama_actor)):
>
> This looks unusual.  drama_actor is just a single string: ranging
> across the characters of a string looks very unusual.  Are you sure
> you want to do this?
>

A better question IMHO is "where did you learn to write code like that 
in the first place", as I've seen so many examples of this that I cannot 
understand why people bother writing Python tutorials, as they clearly 
don't get read?

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence



More information about the Tutor mailing list