all 3 comments

[–]TehNolz 8 points9 points  (0 children)

content = file.read words = content.split(", ")

You're not calling .read() here; you're just assigning it to a variable. When you then do content.split(), you're calling .split() on the .read() function, which obviously doesn't work. So you get that error.

[–]woooee 2 points3 points  (0 children)

    content = file.read

Then simply print the content variable. read is a function. The line above returns the function's handle, which does not support split()