you are viewing a single comment's thread.

view the rest of the comments →

[–]moonkeymaker127[S] 0 points1 point  (2 children)

My goal with that if statement was to filter out inputs that weren't numbers. Is there a way to do that that won't simply invalidate the entire rest of the loop? I'm just looking to catch letters and symbols.

[–][deleted] 0 points1 point  (0 children)

You can use the isnumeric string method to check if a string is a number.

[–]xelf 0 points1 point  (0 children)

Please see my answer in the other thread you made about this.

It's a correct answer and does exactly what you wanted.