newby qn about functions

Cathy James nambo4jb at gmail.com
Tue Jan 18 05:01:57 EST 2011


 #This has to be very simple, but I don't get it-please help

def *lower_case*(s):

    #return s

    print(s)

    #return s.lower()

    print(s.lower())

s=*"Testing Functions-lower case: "
*

lower_case(s)
*"""how can i use a return statement  to write a function that returns the
string "Testing Functions-lower case: "and the lowercase representation of
its string parameter""" If I uncomment the above, nothing outputs to
console:(*
**
*Much appreciation as always.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110118/b511a73d/attachment.html>


More information about the Python-list mailing list