annotation type of collection python

Solutions on MaxInterview for annotation type of collection python by the best coders in the world

showing results for - "annotation type of collection python"
Yannick
02 Jan 2019
1# This example illustrates both parameter and return type annotation
2# Collection annotations are also supported
3from typing import List
4
5def greeting(names: List[str]) -> str:
6    return 'Hello, ' + names[0] ' and ' + names[1]