main.py文件
#_*_coding:utf-8_*_ #__author__ = "csy" from module_csy import say_hello as hello #module_csy模块的say_hello函数起别名为hello print(hello())
module_csy.py文件
#_*_coding:utf-8_*_ #__author__ = "csy" name = ‘csy‘ def say_hello(): print(‘Hello csy!‘)
执行main.py输出结果:
时间: 2024-10-29 19:06:20