list内の数字を足したいのですが解決できなくて困っています。
python
1 2pword = ['1', '2', '3'] 3sum(pword) 4 5============================== 6 7Traceback (most recent call last): 8 File "<stdin>", line 1, in <module> 9TypeError: unsupported operand type(s) for +: 'int' and 'str'
1+2+3 =6
と表示させたいです
回答2件
あなたの回答
tips
プレビュー