babby learning his first python here
This program executes and spits out the text of the file just fine.
But where does the "read()" come from here? I understand that "open" is a built-in python function, but I can't find anything about "read()" anywhere in the documentation
lmao
Open returns a file stream object. Read() is a method of that object
>>55214461
read() is a method defined for file objects, which open() yields.
>>55214512
>>55214498
what's the difference between a method and a function
>>55214525
literally your exact question yields an answer to that.
>>55214545
is an object identical to an instance of a class?
>>55214461
>I can't find anything about "read()" anywhere in the documentation
You need to kill yourself.
>>55214571
What software is that?
>>55214558
an object is an instantiation of a class, if that's what you mean.
"Identical" is a relatively carefully used term, so I would avoid using it to describe things unless you mean it (for example, do you mean value equality (like where 2 objects have the same information), or do you mean two variables point to the same point in memory?)
Anyway, if I understand your question correctly, yes.