Login and get codingIn this Bite you will write a function to get all the class names from the module passed in.
Only return the class names that start with an uppercase character.
We recommend you check out the
inspect
module for this.Here is how your code should work:
>>> from cls import get_classes >>> import csv, string >>> get_classes(csv) ['Dialect', 'DictReader', 'DictWriter', 'Error', 'Sniffer', 'StringIO'] >>> get_classes(string) ['Formatter', 'Template']Introspection of Python can be very useful. Have fun!
70 out of 75 users completed this Bite.
Will you be the 71st person to crack this Bite?
Resolution time: ~31 min. (avg. submissions of 5-240 min.)
Our community rates this Bite 2.5 on a 1-10 difficulty scale.
» You can do it! 😌