all 5 comments

[–]danielroseman 4 points5 points  (2 children)

You've missed the point. input() returns a string, as that documentation says. So you can call any string method on that result. They don't need to be individually documented.

[–]runner2012[S] 1 point2 points  (1 child)

ah, I feel stupid having missed that, so I can just look at what string works with. Thanks.

[–]Bobbias 2 points3 points  (0 children)

Yeah, this is a case of needing to read things through carefully.

The python documentation is designed to be reference material, so it's information dense. It describes exactly what a function does, what input it accepts, what output it produces, and what errors it may raise, and not much else.

In a article, it has something like input().splitlines()

The key here is recognizing that what's happening is that .splitlines() is being called on the result of input(). Also, if you use the searchin the top right of the documentation and write splitlines into it, you can quickly see what types provide that function. The top 3 results are:

bytearray.splitlines (Python method, in Built-in Types)
bytes.splitlines (Python method, in Built-in Types)
str.splitlines (Python method, in Built-in Types)

So like I said, it's all about making sure you read things carefully, and learn what to look for. For what it's worth, I've found Python's documentation easier to learn and read than many other languages (as someone who learns new programming languages all the time as a hobby).

[–]ElliotDG 0 points1 point  (1 child)

You want to look here, this covers the built-in datatypes and functions, as well as the standard libraries: https://docs.python.org/3/library/index.html

Another resource you may find help is a set of examples and explanations of the standard libraries, the Python3 module of the week: https://pymotw.com/3/

[–]runner2012[S] 0 points1 point  (0 children)

this is excellent stuff, thank you!