Skip to content Skip to sidebar Skip to footer

Python: Typeerror: Expected String Or Buffer

I have this code, parsing data from a website: f = open('a url') new = f.read() derp = re.findall(r'
    (.*?)
', new) lin

Solution 1:

You are passing in a list into the function. line is not a string, but a whole list of strings.

Loop over it:

forlinein derp:

Post a Comment for "Python: Typeerror: Expected String Or Buffer"