Walrus Operator: NameError: free variable 'it' referenced before assignment in enclosing scope

前端 未结 0 735
予麋鹿
予麋鹿 2020-12-28 21:41

I want to create a list using the walrus operator like this:

    myvar = tr_list[8].css(\'td ::text\').extract()
    item[\'myvar\'] = [
        it := re.sub(         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题