Python Value Error: not enough values to unpack

后端 未结 4 1986
囚心锁ツ
囚心锁ツ 2021-01-29 08:02

Get the following error in code, unsure of what it means or what I did wrong. Just trying to initialize three list values to empty collections:

nba,nfl,mlb = []
         


        
4条回答
  •  再見小時候
    2021-01-29 08:44

    Another option if you want to unpack a generator for instance:

    nba,nfl,mlb = [[] for _ in range(3)]
    

提交回复
热议问题