Hi All, I just joined this list and am really new to python. I have an assignment to create a function with (a_string, width) which returns the a_string with all the lower case characters changed to upper case characters and vice versa and centered; was wondering if someone could point me in the right direction. I am not just asking for the answer but just need a few tips to get started. So far I do know I should use the dir(str) and do not quite understand what the "width" option is used for....
>>> help(dir) Help on built-in function dir in module __builtin__: dir(...) dir([object]) -> list of strings Return an alphabetized list of names comprising (some of) the attributes of the given object, and of attributes reachable from it: No argument: the names in the current scope. Module object: the module attributes. Type or class object: its attributes, and recursively the attributes of its bases. Otherwise: its attributes, its class's attributes, and recursively the attributes of its class's base classes. def SwapcaseAndCenter(dir,??) Thanks for any advice!
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor