我记得在终端中使用一行命令来从终端多次运行python脚本,并在终端中打印出结果。记住确切的代码或在线查找。像这样:
python3 test.py -#number of times
答案 0 :(得分:1)
您始终可以使用seq和xargs和管道连续运行该程序x次。
seq number_of_times_to_run | xargs -Iz python your_program.py
或者,您可以使用for循环:
for i in {1..2}; do python your_program.py; done