I am working on a python function. I have a given string and I need to find if there is a number on that string, and then add 1 to that number. (any number from 1 to 100).
I found the "find", or the "count" function but what they do (as I understand) is to find a specific letter or number. On my function, I dont know which number I am looking for, so I dont know how to use those functions.
Example 1:
# WHAT I HAVE
string = "STRING 2"
# WHAT I WANT AS A RESULT
STRING 3
Example 2:
# WHAT I HAVE
string = "STRING 9 STRING"
# WHAT I WANT AS A RESULT
STRING 10 STRING
Does anyone knows how to do this? Thanks a lot!