Better-Python¶ Article link¶ 【Python科学计算三维可视化】北京理工大学. 5 Tips To Write Better Python Functions¶ 5 Tips To Write Better Python Functions. Python 1 2 3 4 5 6 7 8 9 10 11 12 13 14def get_users() -> dict[int, str]: users: dict[int, str] = {1: 'Bob', 2: 'Jef', 3:'Tom'} return users def display_users(users: dict[int, str]) -> None: for k, v in users.items(): print(k, v, sep=': ') def main() -> None: users: dict[int, str] = get_users() display_users(users) if __name__ == '__main__': main() output Text Only1 2 3 4PS D:\work\python_work\ModernPython\codes\better-python\type\01b> python .\testprj.py 1: Bob 2: Jef 3: Tom