Zip 函数可以进行多个list的迭代
for price, info, total_deal, seller, location in zip(prices, infos, total_deals, sellers, locations): products = { 'price': price, 'info': info.strip(), 'total_deal': total_deal, 'seller': seller.strip(), 'location': location, } print(products)
将几个list的元素合并为一个list的方法 使用extend
因为学习爬虫需要redis和MongoDB
启动redis 先进入redis路径 再启用redis-server