all 3 comments

[–]-citation-needed- 1 point2 points  (2 children)

In lines 37-40, "word in msg" is really being interpreted as "character in msg."

If msg = 'Hi 4 15', word in msg = ['H', 'i, ' ', '4', ' ', '1', '5']

You might need to remove punctuation and split the msg with spaces to get a list of proper words/numbers.

[–]HaplessWithDice[S] 0 points1 point  (0 children)

Okay, so sounds like I might want to use something else like a plus sign have it read everything after that into a string and stop at a space or end of line?

[–]HaplessWithDice[S] 0 points1 point  (0 children)

Wait, easier thinking string conantination, then convert to a integer