Hi,

I'm trying to make a function that receives text (a string) as an argument and 
returns the same text (as string), but with 1 added to each word that is a 
number.

I need help getting started.

So far, I have:

def FindNumbers(a_string):

    for index, char in enumerate(a_string):
        if char.isdigit():
a_string[index] = 


def Test():

    sometext = "I got 432 when I counted, but Jim got 433 which is a lot 
foronly 6 cats, or were there 12 cats?"
    
    FindNumbers(sometext)

Test()
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to