自学Python:自定义模块导入问题

首先自定义个函数,.py文件:

#定义一个函数
def add_print( str ):
    print("this is the function to change : ", str)
    return

命名为:mysupport.py;

那么问题来了,在另一个py文件中导入却爆了红:
错误提示为没有该模块

解决办法:
这里写图片描述
补齐目录就可以了。

原文地址:https://www.cnblogs.com/Kevin-1992/p/12608406.html