PS:这个玩法很有意思,pycharm还会飘红,
t = ['B0716PK6R2','B077X9J24C','B01N2SBH4J'] count = 0 names = locals() for asin in t: count = count+ 1 names['asin' + str(count)] = asin print(asin1,asin2,asin3)# 输出结果:B0716PK6R2 B077X9J24C B01N2SBH4J