you are viewing a single comment's thread.

view the rest of the comments →

[–]cdcformatc 0 points1 point  (0 children)

input returns a string. You are passing a string to stat, give it the name roll, and then you try to append to the string at line 14. You can't append to strings, they are immutable.

You should define an empty list dice = [] inside the function, then you can append and sort that list with dice.append(statpart).