python 字典循环添加问题
阿神
阿神 2017-04-18 10:19:24
0
1
431
quhao=(requ.findall(href))[0]
    i=0
    for jiage in jiagep:
        #过滤面议价格
        if jiage.b.string=='面议':
            continue
        quhao={}
        quhao[i]=jiage.b.string
        i=i+1
    print(str(quhao))

现在每次只能添加最后一位
{76: '2600'}
{96: '2500'}
{74: '3300'}
{105: '2550'}
{81: '2600'}
{64: '1700'}
{67: '1800'}
{68: '1700'}
{61: '2100'}

这个外面还有一层for循环 目的就是创建不同的字典

阿神
阿神

闭关修行中......

reply all(1)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!