python typehint example for method return type Example: specify return type python function def greeting(name: str) -> str: return 'Hello, {}'.format(name)