📜  字符串的 python 类型提示 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:06.826000             🧑  作者: Mango

代码示例1
# Use ": str" after an argument name
# Use " -> str" in the function header before the ending colon
def greeting(name: str) -> str:
    return 'Hello, ' + name