a guest Aug 13th, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- ### December 2010 ###
- ### Question 3 ###
- class BadTypeException(AttributeError):
- def list_to_lower(str_list):
- Return a new list of the elements in str_list after they have been
- turned to lowercase strings. str_list should be a list of strings, otherwise
- a BadTypeException is raised with the error message: 'Non-string object
- new_str_list = 
- for element in str_list:
- raise BadTypeException, 'Non-string object found.'
- return new_str_list
RAW Paste Data