Python Value Error: not enough values to unpack

后端 未结 4 1994
囚心锁ツ
囚心锁ツ 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:58

    basically means left hand side has more values than right hand side of =

    nba = nfl = mlb = [] should get you three list values initialized to empty collections. So should nba, nfl, mlb = [], [], []

提交回复
热议问题