What's the part that's "changing"?  What's the part that stays the same?

I would recommend thinking of this in terms of a function.

Can you write a function that consumes a letter l and returns the
string "This is ..." where "..." is the uppercased l?

As an example of a simple function on strings:

##########################
## double: string -> string
def double(x):
    return x + x

## For example, a blast from the past:
print "The Noid says: " + double("pizza")
##########################


There are functions in Python standard library that know how to do
things to strings.  See:

    http://docs.python.org/2/library/stdtypes.html#string-methods
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to