# 在其他Python文件中导入模块 import my_module my_module.function() # 或从模块中导入特定函数 from my_module import function function()