1 | initial version |
One can indicate the type of a list by specifying the data type of its elements. For example, a list of integers can be denoted as:
my_list : List[int]
Similarly, a list of strings can be denoted as:
my_list : List[str]
Note that the type of the list is specified using square brackets and the List
keyword from the typing
module.