TypeError: 'int' object is not subscriptable

前端 未结 6 572
一生所求
一生所求 2020-12-13 09:08

I\'m trying to create a simple program that tells you your lucky number according to numerology. I keep on getting this error:

File \"number.py\", line 12, i         


        
6条回答
  •  长情又很酷
    2020-12-13 09:43

    The error is exactly what it says it is; you're trying to take sumall[0] when sumall is an int and that doesn't make any sense. What do you believe sumall should be?

提交回复
热议问题