I'm learning python and I'm finding python methods inconsistent.
Why is it that Len is len(s)
whereas if I want to read a file I do f.read()
and why do I have os.read()
which is completely different that f.read()
.
What's the rationale of having such inconsistency in python.
Why cannot I do s.len()
just like I can do f.read()
? Why does os.read()
exist when f.read()
exists.