如题,想参数与内容混合执行
from concurrent.futures import ThreadPoolExecutor
import time;
import threading
import os
def p1(arg):
print("p1==>:",arg);
def p2(arg):
print("p2==>:",arg);
def p3(arg):
print("p3==>:",arg);
funcs=[];
for x in range(1,4):
funcs.append("p"+str(x));
print(funcs);
nameList=['Tom','jirl','steam'];
with ThreadPoolExecutor(3) as executor:
#for i in funcs: # 这个地方 该怎么处理
for i,j in zip(funcs,nameList):
executor.submit(i,j);
#print()