@one.py 123456789 def (): print("This is one.py")print("Top-level in one.py")if __name__ == "__main__": print("one.py is being run directly")else: print("one.py is being imported into another module") @two.py 123456789 import one print("Top_level in two.py")one.func()if __name__ == "__main__": print("two.py is being run directly")else: print("two.py is being imported into another module") 赞微海报分享
近期评论