Videos
All functions in Python return value. It is None for the list.append method (to stress that it modifies its argument (self) inplace).
All list methods are enumerated in the tutorial. There is no more complete reference as far as I can see.
The docstring for list.append() specifies that it returns None. Run help(list.append) in a Python shell.
I can find that about arrays, but for unknown reasons I failed to find that about lists.
I'm a newb too, but from what I understand list in python is equivalent (but not identical) to an array in most other languages, for example an array in C. So if you find an answer for array, you must take it as a list.
In comments section of PyCharm's manual there's a nice hint from developer:
#: :type: dict of (str, C)
#: :type: list of str
It works for me pretty well. Now it makes me wonder what's the best way to document parametrized classes in Python :).
As pointed out in the PyCharm docs, a (legacy, pre-PEP-484) way of doing this is using square brackets:
list[Foo]: List of Foo elements
dict[Foo, Bar]: Dict from Foo to Bar
list of str, as suggested in the accepted answer, does not work as expected in PyCharm.
Starting with Python 3.5 and the implementation of PEP-484, you can also use type hints, which may be nicely supported by your IDE/editor. How this is easily done in PyCharm is explained here.
In essence, to declare a list return type using type-hinting (Python >=3.5), you may do something like this:
from typing import List
"""
Great foo function.
:rtype: list[str]
"""
def foo() -> List[str]:
return ['some string', 'some other string']
Here we declare (somewhat redundantly) that the function foo returns a list of strings, both in the type hint -> List[str] and in the docstring :rtype: list[str].
Other pre-declared types and more info can be found in the Python docs for typing.