test1.py代码:

1 def disp():
2     print 'hello world!'

同目录下test2.py代码:

1 import test1
2 
3 print 'Hello jju!'
4 test1.disp()

执行结果没问题

相关文章:

  • 2022-01-04
  • 2021-12-18
  • 2021-10-22
  • 2021-06-16
  • 2021-10-07
  • 2022-01-15
猜你喜欢
  • 2022-01-10
  • 2021-09-08
  • 2022-12-23
  • 2021-12-28
  • 2021-12-23
  • 2021-12-06
  • 2021-12-05
相关资源
相似解决方案