【发布时间】:2022-07-27 00:00:46
【问题描述】:
我想像这样一次运行多个def
def one() :
print("hi")
def two() :
print("hi2")
def three() :
print("hi3")
main.py:
from one import one
from two import two
from three import three
one()
two()
three()
我想运行这些命令一次:
one()
two()
three()
我可以这样做吗?
【问题讨论】:
-
你试过运行它们吗?
-
这些函数是否都在同一个文件中?您的代码 sn-p 看起来像,但导入提示并非如此
-
不,每一个都在一个单独的文件中
-
不,我没有尝试过,但这只是一个示例,我实际上将放置一个长脚本而不是每个脚本。
标签: python python-3.x selenium-webdriver web webdriver