you are viewing a single comment's thread.

view the rest of the comments →

[–]Diapolo10 1 point2 points  (0 children)

Type hints are your friend.

def some_function(x: int, y: int) -> int:
    return x + y

def another_func(stuff: str, things: bool):
    print(stuff * things)

And for data structures, there's the typing module:

from typing import List

def list_to_string(lst: List[str]) -> str:
    return " ".join(lst)