mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-06 14:27:26 +08:00
Add typing annotations to Python codes. (#411)
This commit is contained in:
@ -12,7 +12,7 @@ from modules import *
|
||||
""" Driver Code """
|
||||
if __name__ == "__main__":
|
||||
""" 初始化哈希表 """
|
||||
mapp = {}
|
||||
mapp: Dict = {}
|
||||
|
||||
""" 添加操作 """
|
||||
# 在哈希表中添加键值对 (key, value)
|
||||
@ -26,7 +26,7 @@ if __name__ == "__main__":
|
||||
|
||||
""" 查询操作 """
|
||||
# 向哈希表输入键 key ,得到值 value
|
||||
name = mapp[15937]
|
||||
name: str = mapp[15937]
|
||||
print("\n输入学号 15937 ,查询到姓名 " + name)
|
||||
|
||||
""" 删除操作 """
|
||||
|
Reference in New Issue
Block a user