1、from import 与 import 的区别。
# 方法1 测试from import
# from srcd.t_k import python12 as fm12
# result_today = fm12.defc(4, 8)
# print(result_today)
# 方法2 测试from import
# from srcd.t_k.python12 import defc
# result_de = defc(6, 9)
# print(result_de)
# 方法3 测试import
# import srcd.t_k.python12 as im12
# ides = im12.defc(8, 9)
# print(ides)
# 总结:
# from import 与 import 的区别。
# from import 不但可以拿到py文件(也叫模块),也可以拿到模块中的类,或函数。
# import 只能拿到py文件(也叫模块),通过模块名去调用py文件中的类,或函数。