TypeError: 'int' object is not subscriptable

前端 未结 6 566
一生所求
一生所求 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:32

    sumall = summ + sumd + sumy
    

    Your sumall is an integer. If you want the individual characters from it, convert it to a string first.

提交回复
热议问题