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!
68 out of 73 users completed this Bite.
Will you be Pythonista #69 to crack this Bite?
Resolution time: ~31 min. (avg. submissions of 5-240 min.)
Pythonistas rate this Bite 2.5 on a 1-10 difficulty scale.
» You can do it! 😌